COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sanchoniathon on 28 Jul 2010 01:47:24 PM

Title: Level number of Parameter Value ? Ordinal() function
Post by: sanchoniathon on 28 Jul 2010 01:47:24 PM
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 !
Title: Re: Level number of Parameter Value ? Ordinal() function
Post by: sanchoniathon on 28 Jul 2010 02:45:12 PM
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 !