Forum Discussion
gumis_rulez
1 year agoHelper I
Problem with measure limits
I want to have a measure which calculates Checkouts YTD - and this works well; and second measure which calculates Checkouts LYTD till the date I have data in fct table. Checkouts =
CALCULATE(
...
- 1 year ago
Hi gumis_rulez
you should update your LYTD measure as follows:
Checkouts LYTD =VAR _Max = MAX('fct_Hotel Revenue'[Reservation Status Date])VAR LastSaleDatePY = EDATE ( _max, -12 )RETURNCALCULATE([Checkouts YTD],SAMEPERIODLASTYEAR(dim_Calendar[Date]),dim_Calendar[Date] <= LastSaleDatePY)If this post helps, then I would appreciate a thumbs up ๐ and mark it as the solution to help the other members find it more quickly.
Selva-Salimi
1 year agoSolution Sage
Hi gumis_rulez
you should update your LYTD measure as follows:
Checkouts LYTD =
VAR _Max = MAX('fct_Hotel Revenue'[Reservation Status Date])
VAR LastSaleDatePY = EDATE ( _max, -12 )
RETURN
CALCULATE(
[Checkouts YTD]
,SAMEPERIODLASTYEAR(dim_Calendar[Date]),
dim_Calendar[Date] <= LastSaleDatePY
)
If this post helps, then I would appreciate a thumbs up ๐ and mark it as the solution to help the other members find it more quickly.