My date dimension is Year-Month-Day.
I can use the LastPeriods function to retrieve the last X days of readings:
LastPeriods(7,
StrToMember
(
"[Date].[Year Week Day].[Date].&[" + FORMAT(Now(),"yyyy-MM-ddT00:00:00")
+"]"
)
)
I now need to retrieve daily readings for the current quarter. I think I need to use the current date and quarter and calculate the range from the start of the quarter to the current date as my LastPeriods value. This will give me number of days from the start of the current quarter to current day.
I also need to return the last 3 months from the current day. So should I just roll back 12 weeks from today, i.e. 12*7 = 84 days = LastPeriods(84....