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

Show Top n rows in Report based on static value in Prompt

Started by Karanag, 24 Jun 2016 10:14:31 AM

Previous topic - Next topic

Karanag

Hi All,

I have come up with the issue that I have one value prompt where I have given static choices like 10,20,...till 100 so basically 10 static choices and based on that I want that much rows on my report page .Lets say If I have selected 10 then 10 rows should be display in the report likewise.
If someone can guide me on that ..

raj_aries81

Hi Karnag,

You can use a rank funtion and then order it by asc/desc then pass the prompt value to the report.

Regards
Raj

dougp

If the query is sorted the way you want using running-count with a filter will also work.

cognos-t

Hi,

the solution of using a running-count on a rank function may lead to different results then filtering on the the rank function.
The following example shows the different results

Value    Rank    Running-Count on Rank
10            1                       1
20            2                       2
25            3                       3
30            4                       4
40            5                       5
40            5                       6

When you filter for the top 5 values now, a filter on the rank functions will include the second value 40 while it will be filtered out by using a filter on the running-count. You should consider which approach to choose based on your requirements.

Best regards, 


           

Karanag

Thanks Guys Running count worked in my case I just change the detail filter property 'After auto aggregation' and it worked.

Cheers