COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: STiGuy2006 on 16 Dec 2009 02:24:40 PM

Title: Total Calculation Help
Post by: STiGuy2006 on 16 Dec 2009 02:24:40 PM
Hi,

I have total calculation question...

Example:

If Price is 0 and Volume is 50, I want the total to show 50 and not /0. Is this possible? I have a few query calculations dependent on the total and its messing everything up. Price and Volume are not members or measures, rather they are query calcs based off measures.

Thanks
Title: Re: Total Calculation Help
Post by: MFGF on 17 Dec 2009 09:50:57 AM
How have you defined the syntax of your calculation currently?

Have you tried an if-then-else construct to look for zero in Price?

MF.
Title: Re: Total Calculation Help
Post by: STiGuy2006 on 17 Dec 2009 10:12:20 AM
Thanks for the reply..

Yes, I have and no go.

Price is based off of ASP (Measure) (Revenue Divided by Units) and there were 0 units but a negative revenue for that line. Now that I think of it that could be why. I'm thinking of trying a custom query calc of ASP with an IF statement for the 0. Hopefully it works!