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

TM1 Reports using Case statement

Started by HERRERA, 01 Aug 2013 01:08:13 PM

Previous topic - Next topic

HERRERA

 Hello all !!!

I have a TM1 cube and i need make a simple report...

I need to create a data item with Case function. I know its easy, but i cant  :(

When i use transformer cube, i have no problem, but the same statement in TM1 cube, i get an error message.

Does anyone know if tm1 cube does not support the function CASE ??

Tks for help !

Hugs from Brasil !
Herrera


CognosPaul

In general no form of OLAP supports case. Depending on what you were doing with the Power Cubes, you may have been forcing Cognos to use local processing.

What are you trying to achieve?

HERRERA

Hi Paul.

Paul, i understand, but i always use this type of data item. The query is simple, take a look:

Case ?measures?
When 'sales' Then [CUBE].[XXX].[NET_SALES]
When 'revenue' Then [CUBE].[XXX].[TOTAL_REVENUE]
End

I want to make a dynamic prompt with some measures, using static choices.


CognosPaul

Define your prompt as follows:


Display  |  Use
---------+-------------------------
sales    | [CUBE].[XXX].[NET_SALES]
revenue  | [CUBE].[XXX].[TOTAL_REVENUE]




And the data item as
#prompt('measures','token','[CUBE].[XXX].[NET_SALES]')#

No case needed.

HERRERA

Ok Paul, but i have more than one measure. In  this case, how can i create the data item ?

Can i use a statement twice in the same data item ?

For example:

#prompt('measures','token','[CUBE].[XXX].[NET_SALES]')#
#prompt('measures','token','[CUBE].[XXX].[TOTAL_REVENUE]')#

Its correct ?

Tks for help !!!!

CognosPaul

It's not a case statement. With the path of the measure as the USE value in the prompt, it's actually setting that expression to the measure you want. The third parameter of the prompt function is simply the default value. So if nothing is passed to the measures parameter, it will default to showing NET_SALES.

HERRERA

Paul, thanks a lot !!!!!

Its working !!!!

Hugs from Brazil.

Herrera