I have an MDX statement to return a prior period result
([Dim Time].[FullDateAlternateKey].CurrentMember.Lag(1), [Measures].[EOD Book Balance])
which successfully returns the previous day's balances for a selected date
My question is this - is it possible to add something to / or replace the LAG number so that this value is somewhat dynamic. I was thinking that i could do this
([Dim Time].[FullDateAlternateKey].CurrentMember.Lag([Dim Time].[DayNumberofYear]), [Measures].[EOD Book Balance])
So as to return the Year "Opening Balance". But that didn't work - can you do this Or am I barking up the wrong function