我有一张桌子人员预订,其中包含开始日期和结束日期的工作。我也有一个计算表,该表已提交
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.
更多推荐
表关系以确保当表中的日期重叠时使用日期切片器过滤表
发布评论