Forum Discussion
astarkey
8 years agoFrequent Visitor
Return a Value based upon date in another column
This seems like it would be straight forward but I can't seem to put my finger on a solution.... I have similar to this in a table... Equip ID Meter Reading Date Of Reading abc123 ...
- 8 years ago
Try this MEASURE
LastMeterReading = VAR last_date = MAX ( TableName[ Date Of Reading] ) RETURN CALCULATE ( FIRSTNONBLANK ( TableName[Meter Reading ], 1 ), FILTER ( ALLEXCEPT ( TableName, TableName[Equip ID] ), TableName[ Date Of Reading] = last_date ) )
Zubair_Muhammad
8 years agoCommunity Champion
Try this MEASURE
LastMeterReading =
VAR last_date =
MAX ( TableName[ Date Of Reading] )
RETURN
CALCULATE (
FIRSTNONBLANK ( TableName[Meter Reading ], 1 ),
FILTER (
ALLEXCEPT ( TableName, TableName[Equip ID] ),
TableName[ Date Of Reading] = last_date
)
)astarkey
8 years agoFrequent Visitor
Thanks Zubair_Muhammad on second look today this did actually return the result I was after, Many Thanks!!