Forum Discussion
Return only most recent Data
I need to pull only the most recent "Rooms Revenue" value from the table below, according to "RR_CreatedOn" for both DataTypes: "Forecast" and "Budget". I have already written a measure that calculates the most recent "RR_CreatedOn" value. But i have had no successes in pulling the correct RoomsRevenue value for the most recent "RR_CreatedOn" date. Please help.
Recent RR-CreatedOn = Calculate(Max(Fact_RoomsRevenue[RR_CreatedOn]))
*this measure is accurate*
Try this:
Recent RR-CreatedOn =
CALCULATE (
SUM ( 'Fact_RoomsRevenue'[Rooms Revenue] ),
FILTER (
ALL ( 'Fact_RoomsRevenue' ),
( 'Fact_RoomsRevenue'[RR_CreatedOn] )
= MAX ( 'Fact_RoomsRevenue'[RR_CreatedOn] )
)
)
1 Reply
- itsmeResolver I
Try this:
Recent RR-CreatedOn =
CALCULATE (
SUM ( 'Fact_RoomsRevenue'[Rooms Revenue] ),
FILTER (
ALL ( 'Fact_RoomsRevenue' ),
( 'Fact_RoomsRevenue'[RR_CreatedOn] )
= MAX ( 'Fact_RoomsRevenue'[RR_CreatedOn] )
)
)