Forum Discussion

jmhoskinson's avatar
jmhoskinson
Helper I
6 years ago
Solved

Previous Date

I'm working with a table that identifies each activity as a unique row. I want to calculate the last activity date (prior to the one that row represents) for each prospect (identified by the WhoId). So, in the example below, the Prior Activity Column would say 12/6/19 where the CreatedDate column shows 12/19/19. I've read most of the forum stuff on previous dates, but none of it focuses on calculating it on the actual activity table. 

I've taken some stabs at doing it through CALCULATE(MAX(), ...) and LOOKUPVALUE(), but haven't been able to get the DAX to work - usually just a standard error or a circular dependency. Any help would be greatly appreciated.

 

  • Hi,

    Try this calculated column formula

    =CALCULATE(MAX(Data[CreatedDate]),Filter(Data[WhoID]=Earlier(Data[WhoID])))

    Hope this helps.

4 Replies