ssas - MDX: dynamic named set on cubes calculation -
I am trying to create a dynamic named set which can be used in skiing data using the date dimension. I want to do something nominated like the last day, last 7 days, last month, last quarter and so on. For the nominated "last day", I am thinking of doing something.
StrToMember ("[date]. [Calendar]. [Day]. [& Amp; [" + Add date ("d", 1, tail [[date]. [Calendar] [Day], 1) + "]")
I want add date ("D", -1, tail ([date]. [Calendar]. [Days ], 1) + "]")
member_ to return the value so that to return the member I can create a string named Untold, is it possible?
The reason I < Code> DateAdd , it is sometimes that I want my data for the day's level The flaws are getting, so using the previous message will sometimes get the wrong data.
PS: What I mean for the last day is not exactly equivalent to the function Now () - 1
, this is the last day which is available in the cube, so I can not depend on the server system time to get it.
It is expected that you will have to give the last day:
> with member [date [Calendar]. [Last] Co-tail ([Date]. [Calendar]. [day]). ITEM (0) .ITEM (0) SE [Miscellaneous dates] AS {[Date]. [Calendar]. Select [end date]} [different dates] to 0 [MyCube]
You can then create more members in the set (above is not tested but hope that helps)
Comments
Post a Comment