Forum Discussion

damit23183's avatar
damit23183
Microsoft Employee
5 years ago
Solved

MAX 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,   ...
  • PaulDBrown's avatar
    PaulDBrown
    5 years ago

    damit23183 

    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])