Forum Discussion
cevangelista
8 years agoFrequent Visitor
Find the Latest Value
Hi there, How can I find the latest value (Recruitment Stage) for each ID number in the table below based on the Recruitment Stage date? ID No Recruitment Stage Recruitment Stage Date 1...
- 8 years ago
Hey,
i created a calculated column using this DAX statement:
Is Latest = var currentIDNo = 'Table1'[ID No] var latestDate = CALCULATE( MAX('Table1'[Recruitment Stage Date]) ,FILTER(ALL('Table1') ,'Table1'[ID No] = currentIDNo ) ) return IF('Table1'[Recruitment Stage Date] = latestDate, TRUE(), FALSE())Here is a screenshot of the result (my assumptuon: the Recruitment Stage Date is of data type datetime or date). Please be aware that my table shows other dates, this is due some date formatting issues :-) but nevertheless I can use the statement on your table:
This column can now be used to filter the table.
Hopefully this is what you are looking for.
Regards
Tom
Sean
8 years agoCommunity Champion
DELETED!
cevangelista
8 years agoFrequent Visitor
It works! Thank you so much.
If we wanted to use it in an axis for a chart, I can't use the measure can I?