I have a date hierarchy of Year->Qtr->Month->Day
I am trying to retrieve value for last month of prior year (i.e. Dec 2020). Basically all months of 2021 will be compared to value as it was Dec of 2020.
The following gives me exactly what I need, however I don't want to explicitly put in the member for 2021. I want to use whatever year the user is viewing. I have tried currentmember with no luck as I get nothing.
SSAS Calculation:
sum(ClosingPeriod ([Calendar].[Time].[Month],[Calendar].[Time].[Year].&[2021].lag(1)),
[Measures].[Compliance Pct])
Tried this with no luck:
sum(ClosingPeriod ([Calendar].[Time].[Month],[Calendar].[Time].[Year].currentmemeber.lag(1)),
[Measures].[Compliance Pct])