表关系以确保当表中的日期重叠时使用日期切片器过滤表

编程入门 行业动态 更新时间:2024-10-23 10:23:31
本文介绍了表关系以确保当表中的日期重叠时使用日期切片器过滤表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一张桌子人员预订,其中包含开始日期和结束日期的工作。我也有一个计算表,该表已提交

I have a table Staff Booking containing Start date and End Date for a job. I also have a calculated table filed with

Date Range 2 = CALENDAR(MIN('Staff Booking'[Start Date]), MAX('Staff Booking'[End Date]))

我最终希望在这两个表之间建立关系,使得:

I want to eventually make a relationship between these two table such that:

1)何时定义日期切片器范围后,将过滤与切片器重叠的作业(使用开始日期和结束日期列)

1) When the date slicer range is defined, the jobs that overlap the slicer are filtered (using the start dat and end date columns)

2)对于重叠的作业,如果开始日期<分钟(切片日期),然后将开始日期更改为分钟(切片日期)

2) And for the jobs that overlap, if the start date < min(slicer date) then start date change to min(slicer date)

推荐答案

您可以在员工预订2表中添加度量:

You can add a measure to the Staff Booking 2 table:

InRange = if(max('Date Range 2'[Date]) >= max('Staff Booking'[Start Date]) && MIN('Date Range 2'[Date]) <= min('Staff Booking'[End Date])),1,0)

作为一个示例,我将InRange量度添加到了视觉中,但是作为最后一步,您可以仅取1个一次就可以不在InRange列上进行过滤。

As axample I added the InRange measure to the visual but as last step you can filter not on the InRange column by only taking the once which are 1.

更多推荐

表关系以确保当表中的日期重叠时使用日期切片器过滤表

本文发布于:2023-10-30 19:23:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1543769.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:日期   切片   关系   以确保

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!