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

Counts after filtering not working properly

Started by FirstStruck, 01 Apr 2012 12:08:43 PM

Previous topic - Next topic

FirstStruck

Hello,

I made a after auto-aggregation filter to exclude listing people with total hours of less than 10. The list works perfect. It leaves off the names of the 15 people who had less than 10 hours.

I also made another list, using the same query, to count the number of names.

Problem: it is returning the number of names as if the filter for 10 hours is not there. Even though it's actually listing 150 names with more than 10 hours, the count(Employee Name) function is still displaying 165, instead of 150.

Anyone know what I'm doing wrong?

Thanks for your help & suggestions.

blom0344

The after aggregation filter evaluates the results from the query row by row and suppresses the ones that do not qualify.  Performing a count will be done within the query prior to applying the filter , hence the 165 (instead of 150)

You should use the original query as input for a second one where you perform a distinct count on the employee id of the original query to get the proper results.

FirstStruck

Quote from: blom0344 on 01 Apr 2012 02:50:20 PM
The after aggregation filter evaluates the results from the query row by row and suppresses the ones that do not qualify.  Performing a count will be done within the query prior to applying the filter , hence the 165 (instead of 150)

You should use the original query as input for a second one where you perform a distinct count on the employee id of the original query to get the proper results.

Thanks for your reply Blom0344!

I understand your first paragraph about the after auto aggregate function.

However, I am not sure how to go about using the original query as input for another. Could you please explain how this is done?

Thanks again!

blom0344

Create a second query by dragging it into the gui. Drag the first query to the right of the second one. An arrow will appear from right to left between the 2.  The original query will be displayed as a query reference to the right of the new query