Forum Discussion
Show Tasks in specific month using date slicer
- 6 years ago
Hi, Haya
Based on your description, I created data to reproduce your scenario.
You may create a Date table as follows.
Calendar = CALENDARAUTO()Then you can create a measure as below.
IsProcess = var _mindaterange = CALCULATE( MIN('Calendar'[DateRange]), FILTERS('Calendar'[DateRange]) ) var _maxdaterange = CALCULATE( MAX('Calendar'[DateRange]), FILTERS('Calendar'[DateRange]) ) return IF( NOT OR(_maxdaterange<MAX('Table'[Start Date]),_mindaterange>MAX('Table'[End Date])), 1,0 )Finally you need to put the measure to the visual level filter. Here are the results.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks v-alq-msft
I followed your step but the output is incorrect
would you please explain this line of the code:
return
IF(
NOT OR(_maxdaterange<MAX('Table'[Start Date]),_mindaterange>MAX('Table'[End Date])),
1,0
)Hi, Haya
The formula excludes the wrong results, where the minimum value of date range is greater than the current 'End Date' or the maximum value of date range is less than the current 'Start Date'. Then the remaining cases satisfy the condition.
Best Regards
Allan