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

TopCount function for relational data sources

Started by norakmal.hakim, 02 Mar 2016 01:22:40 AM

Previous topic - Next topic

norakmal.hakim

Hi! I understand that TopCount function only applies to dimensional data sources but I was wondering if there is the equivalent function for relational data sources?

I tried to use the rank function and filter the rank, but the rank function has the feature where if the count is the same, it will return the same rank twice.

This will cause formatting issues if let's say there's only space for 3 rows, but due to the same rank returning twice, 4 rows will be returned instead.

e.g.

rank | count
1      |     5
1      |     5
2      |     3
3      |     1

I want the first 3 rows only. (counts 5,5 and 3)


Thanks in advance.

R Ambre

Hi,

Create one data item having rank function which will give you rank as you are getting now.
And top of it create another data item having running-count (Rank Data item )

I hope this will resolve your problem.

norakmal.hakim

Quote from: R Ambre on 02 Mar 2016 01:44:36 AM
Hi,

Create one data item having rank function which will give you rank as you are getting now.
And top of it create another data item having running-count (Rank Data item )

I hope this will resolve your problem.

Thanks! I tried this in the beginning and it didnt quite work, but i realised it's because you have to change one of the properties such that the filter (where running-count column <= 3 for eg) applies only after aggregating not before.

It works fine after that. Thanks again.