I'm having this error after creating a named set in SSAS to retrieve the last 10 weeks from the first day of current week. the expression I used is :
strtoset(
"LASTPERIODS(
10
,[AxeTemps].[Semaine].&["+Format(NOW()-WEEKDAY(NOW(),2),'yyyyMMdd')+"]")
My date hierarchy has the following members structure :
[AxeTemps].[Semaine].&[20000101].
I can't get this work, any idea ?
You have convert the a member first, then you can pass it to the LastPeriods():
LastPeriods(
10,
StrToMember("[AxeTemps].[Semaine].&[" + Format(NOW()-WEEKDAY(NOW(),2),'yyyyMMdd') + "]")
)