Forum Discussion
JCK2
3 years agoHelper III
Get latest value based on max date
Hello!!! I want to get the latest target based on the latest date and for the date format has time also, so basically the latest value based on max date and time. The expeted output of this i...
latimeria
3 years agoSolution Specialist
Hi JCK2 ,
Something like this:
//get max date for 1 project
VAR MaxDate = calculate( max('table'[Modified Date]), allexcept('table, 'table'[project name]))
RETURN
//get target for max date for the project. Instead of max, you can use min as you retrieve only 1 value
//assumpton: you have a relationship between table date & project date
calculate( max('table'[Target]), datetable[date] = MaxDate)