If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

referencing members in a case statement

Started by avuong6, 09 Sep 2015 02:42:21 PM

Previous topic - Next topic

avuong6

writing a report with a column that need to change based on user selections. so i use case statements to drive the logic. issue is how do i reference a member in the case statement? see code below:

case ?P_Report_Type?
when 'YTD' then
   case ?P_Budget2?
   when 'ACTUAL' then
   tuple ([P_Period1],[P_Budget1],[Column1 Rate Type],[YTD vs PY Act Ops $])
   end
end

the first case statement works because they are all static text values i defined (YTD, QTD, MTD). the second one does not work because the parameter P_Budget2 stores a member of the budget hierarchy while my "when" section refers to a text value. how do i refer to a specific member where i now have the 'ACTUAL' text. i tried dragging the [ACTUAL] member from my data src. that gave this error:

see image attached.





Francis aka khayman

it does not work because the data type of the thing you compare to ?P_Report_Type? should be the same. if you are using text, you should use text all the way.

try dragging the [ACTUAL] member to your query, and use the caption:

caption([ACTUAL])