Forum Discussion
Anonymous
4 years agoNot applicable
Pulling most recent value
Hi all, For some reason I am struggling to figure out how to pull the last value, the column is a calculated column (each row contains a 0 or 1 the field has been set to average). When I put the ...
- Anonymous4 years ago
The following worked for me
Measure =VAR Max_Date = MAX(Table[Date])VAR Latest_MS = CALCULATE([Measure2],Table[Date]=Max_Date)Return Latest_MSSource: Get Most recent/Max Date value in PowerBI using DAX | MiTutorials - YouTube
Saap
Resolver III
4 years agoHi Anonymous
Maybe try to use this measure:
% product sales =
var MaxDate = CALCULATE(MAX('Table'[Date]), ALL('Table'))
return
CALCULATE(MAX('Table'[Product Sales]), FILTER('Table','Table'[Date]=MaxDate))
It display this value when put into card visual.
It display this value when put into card visual.
- danextian4 years ago
Super User
Hi Saap ,
Try this measure below. Change the table and column names accordingly
Value of the latest date = VAR __MAX_DATE = CALCULATE ( MAX ( Dates[Date] ), ALLSELECTED ( Dates ) ) //ALLSELECTED for the max date in the current filter context, ALL for the max date in the Dates table regardless of the filters applied RETURN CALCULATE ( [Sum of Values], Dates[Date] = __MAX_DATE )sample result -