COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rajivgupta1107 on 16 Dec 2008 11:41:14 PM

Title: Scope of Filters
Post by: rajivgupta1107 on 16 Dec 2008 11:41:14 PM
Hi,

Please explain the concept of 'Scope of summary filters' with some example and where it is used?

Regards
Title: Re: Scope of Filters
Post by: Gopinath on 17 Dec 2008 12:23:40 AM
Scope determines the level at which the filter shouild be applied.

for example
you have Region, country, State and Revenue data items in your report.
Region, Country and State were grouped.
If you Total the Revenue field you will get footers(sub totals) for Country and Region.
Now if you want to filter Country which has > 50000 revenue, then create a summary filter like Total(Revenue) > 50000 and set the scope to Country.
Title: Re: Scope of Filters
Post by: rajivgupta1107 on 17 Dec 2008 01:18:44 AM
okk thanks a lot..

One more thing:
Suppose I have a query in the report:

select sum(revenue), region from table group by region having sum(revenue) >100;

Data is:

Revenue  Region
200   A
40  B
500 G


Now in report I show only the region. Its showing A,B,G. But it should show only A and G. For 'B' the having clause is false.

Why it is so?



Title: Re: Scope of Filters
Post by: Gopinath on 17 Dec 2008 03:29:22 AM
try total(revenue for Region) > 100 in your summary filter
Title: Re: Scope of Filters
Post by: rajivgupta1107 on 17 Dec 2008 03:34:48 AM
I have put the filter in summary filters.

But when i try to show the region, its showing A, B and G all. But it shud be A and G only.


Regards
Title: Re: Scope of Filters
Post by: Gopinath on 18 Dec 2008 12:30:24 AM
Try placing the filter condition at Detail Filters and change the application property to After auto aggregation.