Friday, March 30, 2012

named set with a condition

I am having a little problem with returning 13 or 14 periods in a named set. Is it possible to have a condition in a named set

ie if there is not a string of "14" in the set of (last 13 periods) then return the set of 13 periods else return the set of 14 periods.

Thanks.
Mark.

Hi Mark,

generally named sets are static and will be computed ones in the scope they belong to.

Could you please provide your sample set expression and query that used it?

Best regards,

Vladimir

|||

Code Snippet

{LastPeriods(12,Filter([Accounting Week Calendar].[Accounting Period].Members, [Accounting Week Calendar].Currentmember.Properties("Current Period")<>"0").Item(0))}


This provides me with a set of 12 periods.

What I want is to return preferably as a named is a set of 13 or 14 periods. This is to give a Moving annual total. We will return 13 periods if all of the periods contain 4 weeks, we will return 14 periods if they dont. We know that it if there is a period 14 it will only ever contain 1 week.

Need some way to provide this from the cube rather than the users doing the arithmetic.

As a blunt method I could use an iif insode a named set if this is possible.

Thanks.
Mark.

No comments:

Post a Comment