Forum Discussion
Pierre_B
3 years agoNew Member
Create a max date measure for each id
Hi everyone, I would like to create a measure using dax in order to get the max date for each id and filtered date, and keeping the every date in my table. date id max date 01/01/2022...
Barthel
Solution Sage
3 years agoTry using a variable. For me that seems to do the trick.
max date =
VAR _dates =
ALLSELECTED ( 'Table'[date] )
VAR _result =
CALCULATE (
MAX ( 'table'[date] ),
REMOVEFILTERS ( 'Table' ),
VALUES ( 'Table'[id] ),
_dates
)
RETURN
_result