Hello,
I need to create set for last 10 days from last sunday.
I am able to create single values for last sunday and for last sunday minus 10 days
WITH SET [LastSunday] AS StrToMember('[Calendar date].[Year - Quarter - Month - Date].[Date].&[' + Format(DateAdd("d",-10,DateAdd("d",-DatePart("w",Now()),Now())), "yyyy-MM-dd") + 'T00:00:00]') SET [Last sunday minus 10 days] AS StrToMember('[Calendar date].[Year - Quarter - Month - Date].[Date].&[' + Format(DateAdd("d",-DatePart("w",Now()),Now()), "yyyy-MM-dd") + 'T00:00:00]')
It works fine, but how can I create SET with CREATE SET clause for range [LastSunday]:[Last sunday minus 10 days]
I have tried
CREATE SET [LastSunday] AS StrToMember('[Calendar date].[Year - Quarter - Month - Date].[Date].&[' + Format(DateAdd("d",-10,DateAdd("d",-DatePart("w",Now()),Now())), "yyyy-MM-dd") + 'T00:00:00]: [Calendar date].[Year - Quarter - Month - Date].[Date].&[' + Format(DateAdd("d",-DatePart("w",Now()),Now()), "yyyy-MM-dd") + 'T00:00:00]')
But it did not work.
Thanks