Level Number of parameter value

Hi to all,

1- I have this report that has two Tree Prompts in my prompt page

2- I need to know the LEVEL NUMBER of the selected parameter. If its 0, 1 or 2 etc …

3- I am not sure how to calculate that but i’ve heard that i can use the ordinal( ) function

4- I tried using it but with no luck. This is what i have tried so far with no luck:
ordinal ( [CubeName].[HierarchyName].[ProductDimension].[ProductLevel]->?pProduct? )

5- But i keeop on getting the following error message:
QE-DEF-0478 Invalid coercion from ‘member’ to ‘level’ for ‘[CubeName].[HierarchyName].[ProductDimension].[ProductLevel]->?pProduct?’ in ‘ordinal( [CubeName].[HierarchyName].[ProductDimension].[ProductLevel]->?pProduct? )’.

The idea here is to get the LEVEL NUMBER in return like 0 or 1 or 2 etc …

Thanks in advance !

Hi to all,

I found out on another FORUM that i needed to use the following expression instead:
ordinal( level ([CubeName].[HierarchyName]. [ProductDimension].[Prod uctLevel]->?pProduct?))

Thanks anyhow !

I know that you already found your answer, but just in case you don’t have it… very useful “IBM Cognos 8 BI Dimensional Functions” document: http://www.ibm.com/developerworks/data/library/cognos/page82.html

Hope you can find all your answer there, next time of course… :wink:

Thanks sashafay !