COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: am65 on 09 May 2010 07:28:44 AM

Title: How to make a HAVING clause in Report Studio
Post by: am65 on 09 May 2010 07:28:44 AM
I'm trying to make an expense report in Cognos 8.4 Report Studio where only the categories with an aggregated expense of more than 50 euros must be shown. The categories where the expense is 50 euros or less must not be shown in the report. Something like this

Category A 51
Category B 70
Category C 81

I use the following summary filter: Expense > 50

But RS seems to ignore it and anyway shows the following

Category A 51
Category B 70
Category C 81
Category D 50

How can I make this?
Title: Re: How to make a HAVING clause in Report Studio
Post by: CognosPaul on 09 May 2010 07:43:06 AM
Instead of using a summary filter, you can use a detail filter. After you create the filter click on it, in the properties on the bottom LEFT you'll have the option to set it to "After Auto Aggregation". That will change it from a "where" to "having"

edit: When I'm tired I can't tell the difference between left and right.
Title: Re: How to make a HAVING clause in Report Studio
Post by: am65 on 09 May 2010 10:19:26 AM
Great, not it works. Thanks

Quote from: PaulM on 09 May 2010 07:43:06 AM
Instead of using a summary filter, you can use a detail filter. After you create the filter click on it, in the properties on the bottom LEFT you'll have the option to set it to "After Auto Aggregation". That will change it from a "where" to "having"

edit: When I'm tired I can't tell the difference between left and right.