Forum Discussion
Daretoexplore
Advocate I
1 year agoMost recent entry for a person
Hi all I have some data which is customer and transaction based, like this. CustID. TransactionDate. Amt 12345. 1/12/24. £32.45 12678. ...
- 1 year ago
You could create a column like
Is Latest Date = VAR LatestDate = CALCULATE ( MAX ( 'Table'[Transaction Date] ), ALLEXCEPT ( 'Table', 'Table'[Customer ID] ) ) VAR Result = IF ( LatestDate = 'Table'[Transaction Date], 1 ) RETURN Result
Kedar_Pande
Super User
1 year agoCreate a New Calculated Column
IsMostRecentTransaction =
VAR LatestDate =
CALCULATE(
MAX('YourTable'[TransactionDate]),
ALLEXCEPT('YourTable', 'YourTable'[CustID])
)
RETURN
IF('YourTable'[TransactionDate] = LatestDate, 1, 0)
You should see a 1 for the most recent transactions for each customer and a 0 for others.
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn