MrTy
Technical User
- Sep 23, 2011
- 13
According to COGNOS documentation, one should be able to use these operators: =, <>, in, and not in. For example: currentMember([Period].[Years].[Years]) in [ThisYearPeriodsToDate] and have it return TRUE if the currentMember is in the set [ThisYearPeriodsToDate].
I am trying the following:
tuple([USD],if (currentMember([PLSummTM1].[Periods].[Periods]) not in firstSibling([ThisCurrentPeriod]) ) THEN ([Budgeted]) ELSE ([Actual]),[Forecast],[[REVENUE]]])
The desired result is if the current member of the periods hierarchy is in the firstSibling of the current fiscal period, then return Actual else return Budgeted.
In context: If Jan not in firstSibling(Apr) then Budgeted else Actual. firstSibling(Apr) should evaluate to Jan and return Actual.
I get a parsing error on this at the firstSibling function on its first bracket.
QE-DEF-0260 Parsing error before or near position: 94 of: "tuple([USD (Current)], if (currentMember([PLSummTM1].[Periods].[Periods]) not in firstSibling"
QE-DEF-0261 QFWP - Parsing text: tuple([USD (Current)], if (currentMember([PLSummTM1].[Periods].[Periods]) not in firstSibling([ThisCurrentPeriod]) ) THEN ([Budgeted]) ELSE ([Actual]),[Forecast],[[REVENUE]]])
My questions are what am I missing here in the parsing and is this a valid construct or is COGNOS documentation slack as usual?
Thanks for any help.
I am trying the following:
tuple([USD],if (currentMember([PLSummTM1].[Periods].[Periods]) not in firstSibling([ThisCurrentPeriod]) ) THEN ([Budgeted]) ELSE ([Actual]),[Forecast],[[REVENUE]]])
The desired result is if the current member of the periods hierarchy is in the firstSibling of the current fiscal period, then return Actual else return Budgeted.
In context: If Jan not in firstSibling(Apr) then Budgeted else Actual. firstSibling(Apr) should evaluate to Jan and return Actual.
I get a parsing error on this at the firstSibling function on its first bracket.
QE-DEF-0260 Parsing error before or near position: 94 of: "tuple([USD (Current)], if (currentMember([PLSummTM1].[Periods].[Periods]) not in firstSibling"
QE-DEF-0261 QFWP - Parsing text: tuple([USD (Current)], if (currentMember([PLSummTM1].[Periods].[Periods]) not in firstSibling([ThisCurrentPeriod]) ) THEN ([Budgeted]) ELSE ([Actual]),[Forecast],[[REVENUE]]])
My questions are what am I missing here in the parsing and is this a valid construct or is COGNOS documentation slack as usual?
Thanks for any help.