Forum Discussion
damit23183
Microsoft Employee
5 years agoMAX date by group
Hi, I have below table below, I am trying to find days between current date and max date by ID. As you can see there are 2 layer below ID. I am expecting this result, ...
- 5 years ago
Ok, I see what you mean now. Try this:
Last Date = CALCULATE ( LASTDATE ( FactTable[Date] ), ALLEXCEPT ( FactTable, FactTable[ID], FactTable[Activity], FactTable[Sub Activity] ) )and
Days from today = INT(TODAY() - [Last Date])
Ashish_Mathur
Super User
5 years agoHi,
To your matrix/table visual, drag the ID column and write these measures
Max date = max(Data[Date])
Difference = today()-[Max date]
Hope this helps.
- damit231835 years ago
Microsoft Employee
Hi Ashish,
Thank for your response.
Well, your solution was the first one i tried but due to hierarchy level in table it did not work.
There are multiple level like Level 1 to Level 8 and only one Date column. Further, I need to find MAX date at each level.
Thanks