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

Case statement for Data items with DMR functions

Started by ajaju30, 23 Sep 2014 07:32:23 AM

Previous topic - Next topic

ajaju30

Hi,

I have two data items as Prev_period and Previous Year with definition as mentioned below.

Prev_Period : lastPeriods(2,[Savings (Analysis)].[Time (Arrival)].[TIME (ARRIVAL)].[MONTH]->?p_month?) - User selected month and its previous month

Prev_year : union(lastPeriods(1,[Fuel Savings (Analysis)].[Time (Arrival)].[TIME (ARRIVAL)].[MONTH]->?p_month?),lastPeriods(1,parallelPeriod([Savings (Analysis)].[Time (Arrival)].[TIME (ARRIVAL)].[MONTH],12,[Fuel Savings (Analysis)].[Time (Arrival)].[TIME (ARRIVAL)].[MONTH]->?p_month?))) - User selected month and same month for previous year.

I have a drop down from where user selects whether the graph as to be displayed for previous period or previous year.
I am trying to create a new data item with case statement as and use it in graph- case when(?p_comparison? = 'Previous Period')
then
([Prev_Period])
when(?p_comparison? = 'Previous Year')
then
([Prev_Year])
end

But, I am getting error as "   The query is not supported. The argument at position 2 of 'when' from the data item 'Data Item1' cannot be coerced into a 'value' expression.=== Please see http://www.ibm.com/search/csass/search?q=XQE-PLN-0093 for more information ===. "

Kindly suggest how can I implement the above scenario.

Thanks in advance!!

Aarti