COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: epurwanto on 25 Sep 2020 12:10:58 AM

Title: Combine items to be used as filter
Post by: epurwanto on 25 Sep 2020 12:10:58 AM
Hi All,

Help please!  As you can see in the attached example, I'm getting incorrect data output.  Report multiplies total and completely ignores filter, because I think I need to combine [Personnel Type] and [ID] as one item.

So I tried creating a new query calc using sql the when-then-else-(0), but I will not have the 'then' clause.

Any ideas will be greatly appreciated!
Title: Re: Combine items to be used as filter
Post by: bus_pass_man on 25 Sep 2020 07:02:42 AM
It's doing exactly what it is meant to do.

You have 8 rows in your table.  There are 4 rows where the value for fund is 99.  There are 4 rows where the value for fund is 79.  The values for total for 99 are 5,6,5,6. The values for 79 are 8,4,8,4.

Those values sum to the values you see in your current output.

Presumably, you want personnel type, ID, Act to come into play.  Hint hint.  Maybe there could be some way to determine hint hint query generation a bit better.


You don't mention the structure of the data. Is this data all in one table?  What's the usage of the query items?  You don't mention how you think the value for 99 should be 11 and that for 79 should be 12.  Do you want the values to sum or to aggregate some other way?

Is this a class assignment?