Forum Discussion
Not Started, Completed, In Progress based on Dates
- Anonymous5 years ago
Hi Anonymous ,
The Max()/Min() functions express different meanings in calculated and measure, for example:
1. Using the Max() function in calculated is to take the maximum value of this column, see the result below
max_measure = MAX('Activity'[planned finish])[planned finish] The largest date in the column is 2024.10.9
2. Use the max() function in measure to take the value of the current row.
max_measure = MAX('Activity'[planned finish])Take out the current value of each row
So use the following function according to your rules, you can compare the value in the slicer with each Activity in the table row by row and compare the start and finish dates of each activity
Measure 2 = var _select =SELECTEDVALUE('Table'[Date]) return IF(MAX('Activity'[planned start]) <_select,"Not Started", IF(_select > MAX('Activity'[planned finish]), "Completed" , "In Progress"))Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hey Anonymous ,
the challenge you are facing has a name - Events-in-progress.
This article
Events-In-Progress | Gerhard Brueckl on BI & Data (gbrueckl.at)
contains all the necessary links to get started and also to create solutions for more advanced scenarios. A good start is the article by Jason Thomas.
Hopefully, this provides some more insights.
Regards,
Tom