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

Need help on total

Started by limkw, 08 Jul 2015 03:37:05 AM

Previous topic - Next topic

limkw

Hi,

I have been trying to find out what is the problems with no avail. I have data item label z output with this syntax
case when ([Feature code] = '0934') or ([Feature code] = '0935') or ([Feature code] = '7091')
then
count ( distinct [MACSR] )
else
0
end

then I create another data item total z with this syntax

total ([z output])

The issue is the data item z output have 1 on some row but the total z is 0.  I thought is datatype problem and I cast it to integer but problem still persist.  Can someone in this community provide what is the issue and how to rectify it? Or is there alternative method of doing it?
Attached output file.

gpollock

I'm still trying to wrap my head around what exactly you're trying to do.  The Z Output column is designed to show the count of unique MACSR when certain conditions are correct, and then you want to total it up on the same row?

Try setting the aggregate and rollup aggregate functions.  First, set aggregate to calculated, and rollup aggregate to total.  What happens now?  If that doesn't work, set both to calculated.  Either of these should get your summary rows working.  Finally, use the solve order to your advantage.  Tell Cognos that Z Output should be solved before the total.

If none of those work, could you please provide more detail for what the correct output should look like?

timness

Quote from: gpollock on 08 Jul 2015 01:51:33 PM
I'm still trying to wrap my head around what exactly you're trying to do.  The Z Output column is designed to show the count of unique MACSR when certain conditions are correct, and then you want to total it up on the same row?

Try setting the aggregate and rollup aggregate functions.  First, set aggregate to calculated, and rollup aggregate to total.  What happens now?  If that doesn't work, set both to calculated.  Either of these should get your summary rows working.  Finally, use the solve order to your advantage.  Tell Cognos that Z Output should be solved before the total.

If none of those work, could you please provide more detail for what the correct output should look like?
I agree - is there a reason you're trying to calculate a running total rather than putting a total at the bottom of your list?



sent form my g-note4


shelby435

you might want to try changing the solve order of the z total to 2.