Forum Discussion
Anonymous
3 years agoNot applicable
Using Selected Date in Measure
Hi All, I am looking to use a slicer to select a date in the future to view how many projects are categorized as "Done", "In Progress", or "Scheduled". My Current DAX looks like: Status = ...
- 3 years ago
Hi Anonymous ,
This is my test table:
Date table:
Create a measure:
Status = VAR MINDate = MIN('Table'[Date]) VAR MAXDate = MAX('Table'[Date]) RETURN SWITCH ( TRUE (), MINDate <= MAX(timeline[Start Date]) && MAXDate >= MAX(timeline[End Date]), "In Progress", MINDate >= MAX(timeline[Start Date]) && MAXDate >= MAX(timeline[End Date]), "Done", "Scheduled" )Create a slicer form date table and create a table visual from timeline table:
You can select a date in the future to view how many projects are categorized as "Done", "In Progress", or "Scheduled":
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
djurecic
3 years agoSuper User
Hi Anonymous ,
The slicer may be filtering out any dates other than the selected date, so you won't get any results where the date is < or >.
You can use the All function on the timeline table to escape the slicer filtering.
https://learn.microsoft.com/en-us/dax/all-function-dax