COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognosun on 08 Jul 2013 06:50:10 AM

Title: running-count() - limitation
Post by: cognosun on 08 Jul 2013 06:50:10 AM
GURUS,

Using running-count() function I'm extracting only 10 rows in my report ( top 10 product sales in descending).

Now below my summary/Totals field, i need to display another field which should show me total of all product sales (say i have 100 products in my company).

Any idea like how to achieve this.

Problem is I'm already using running-count() function in detail filter section ( running-count <=10)

Many thanks in advance,
Joys
Title: Re: running-count() - limitation
Post by: blom0344 on 08 Jul 2013 12:45:17 PM
Hmm, perhaps use a singleton (query) for the overall total?
Title: Re: running-count() - limitation
Post by: cognosun on 10 Jul 2013 03:44:32 AM
There are 2 queires in the report...one for running count , and other for genearl.

I need third aggregate which should divide values from query1( running total) with query 2 ( general).

Here i'm getting error
Title: Re: running-count() - limitation
Post by: blom0344 on 10 Jul 2013 04:53:56 AM
Okay, but in your original post you mention showing overall total figure.  Working with measures from 2 queries would mean somehow joining them and using the result query to perform the calculation. This works cause the initial queries are processed prior to the 'local' join..
Title: Re: running-count() - limitation
Post by: adam_mc on 10 Jul 2013 02:38:52 PM
How about not using a detail filter (and effectively display all 100 rows).
Then use the running-count as a Conditional Format to hide the 90 additional rows?
Your Summary/Total row should then reflect all 100 rows.
Title: Re: running-count() - limitation
Post by: Lynn on 10 Jul 2013 03:15:34 PM
I would try Adam's idea...a single query with all the data and then a conditional style on each column that sets box type to none for anything with a running-count > 10
Title: Re: running-count() - limitation
Post by: cognosun on 11 Jul 2013 02:18:03 PM
In this case if i do total, i get total of 100 values.

But here i want 3 lines of totals...first line should give total of 10 values, second line should give total of 100 values, third line is 10/100


:-)
Title: Re: running-count() - limitation
Post by: Lynn on 11 Jul 2013 03:15:15 PM
Take a look at the attached report using the go sales package.

There is a base query that returns all data.

Then a query reference to get the top 3 aggregated.

Then another query reference to get the total aggregated.

Then a union to put those two together as separate rows in the report with a query calculation in the footer for the percentage.

There is probably a more direct way to get this but it eludes me at the moment.