Forum Discussion
Using Selected Date in Measure
- 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.
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.