COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: MellBI on 14 Mar 2011 07:30:33 AM

Title: How to work with Conditions against Powerplay cube - Not solved but closed
Post by: MellBI on 14 Mar 2011 07:30:33 AM
Hi All,

I am trying to create a new Data Item using Dimensional data. The problem for me is that my goal is to solve a situation that i would have solved like this if it was relational.
if (Region = ?pGeography?) Then (Amount) ELSE (0)
Region and Amount are existing Data Items.

If I hardcode like the following it works fine.
if((CAPTION([US COMMISSION INDICATOR (visible items with calculations set)])) ='US NY/NJ' )  THEN ([Amount USD]) ELSE (NULL)
Point is that I need to compare with the parameter instead.

Any ideas?

Regards
MellBI
Title: Re: How to work with Conditions against Powerplay cube
Post by: CognosPaul on 14 Mar 2011 08:37:03 AM
Hi MellBI,

It looks like you're new to dimensional reporting. I'd recommend reading up on it:
IBM Cognos BI Dimensional Functions (http://www.ibm.com/developerworks/data/library/cognos/page82.html) and Writing Efficient OLAP Queries (http://www.ibm.com/developerworks/data/library/cognos/page128.html).

To answer your question, you should be able to do something tuple(Amount,?pGeography?)
Title: Re: How to work with Conditions against Powerplay cube
Post by: MellBI on 14 Mar 2011 09:30:25 AM
Hi,
I am not totally new to Dimensional reporting but this causes me some trouble :(

Actually I tried the tuple but my prompt for my Parameter then changed behaviour.
I used to have a tree prompt with several geographical locations but when I use Tuple I only get the top level in the prompt.

/MellBI
Title: Re: How to work with Conditions against Powerplay cube
Post by: CognosPaul on 14 Mar 2011 10:23:30 AM
That's very odd. So when you attempt a tuple the measure isn't sliced?

Do you have any other detail filters in the report? Mixing relational and dimensional techniques tends to cause unpredictable results.

For a test, try placing the prompt into the slicer of the query. See if that effects the measure.
Title: Re: How to work with Conditions against Powerplay cube
Post by: MellBI on 15 Mar 2011 03:46:03 AM
Hi,

I tried to use the Parameter as a slicer and got the same behaviour, just the top level.
There is a filter defined but removing that do not change anything.

Then it might be related to the Parameter instead



/MellBI
Title: Re: How to work with Conditions against Powerplay cube
Post by: MellBI on 15 Mar 2011 07:39:03 AM
Hi,

I gave up and redesigned the report a little bit and now i use another way of displaying the data where I do not need this functionality.

Thanks for your support.

/MellBI
Title: Re: How to work with Conditions against Powerplay cube - Not solved but closed
Post by: barrysaab on 15 Mar 2011 12:28:52 PM
Could you please share, what method you actually employed.Thanks