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])
PaulDBrown
Community Champion
5 years agoOk, 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])
damit23183
Microsoft Employee
5 years agoHi Paul,
Thanks for quick response.
You mean i will have to include all levels ID column in LAST DATE calculated Column which you did mention?
or Individual for each ID so for example in this case ID is level 1 that means in when i calculate LAST DATE then only ID should be there in ALL EXCEPT funtion and so on fo other levels?