Forum Discussion
Get next date in a list
- 8 years ago
Hi Anonymous,
Based on my test, you should be able to use the formulas below to create two measures to get next date and milestone for an Id.
Next Date = var currentDate = TODAY() var currentID = MAX(Table1[Id]) return CALCULATE(MIN(Table1[Deadline]),FILTER(ALL(Table1),Table1[Id]=currentID&&Table1[Deadline]>=TODAY()))
Next Milestone = var currentDate = TODAY() var currentID = MAX(Table1[Id]) return CALCULATE(MIN(Table1[Action Title]),FILTER(ALL(Table1),Table1[Id]=currentID&&Table1[Deadline]>=TODAY()))
Here is the same pbix file for your reference. :smileyhappy:
Regards
Hi Anonymous,
Based on my test, you should be able to use the formulas below to create two measures to get next date and milestone for an Id.
Next Date = var currentDate = TODAY() var currentID = MAX(Table1[Id]) return CALCULATE(MIN(Table1[Deadline]),FILTER(ALL(Table1),Table1[Id]=currentID&&Table1[Deadline]>=TODAY()))
Next Milestone = var currentDate = TODAY() var currentID = MAX(Table1[Id]) return CALCULATE(MIN(Table1[Action Title]),FILTER(ALL(Table1),Table1[Id]=currentID&&Table1[Deadline]>=TODAY()))
Here is the same pbix file for your reference. :smileyhappy:
Regards
thanks a lot - that worked!
Now for the tricky part - how can I show this in a gantt chart? When I try to calculate duration until milestone by just taking the difference between Next MS Date and TODAY(), the return value is in date format. Is there any way to get this into a number format so that I can use it as a duration in the gantt?