COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: JuliaM on 27 Aug 2012 09:29:27 AM

Title: Incorrect calculations in Crosstab
Post by: JuliaM on 27 Aug 2012 09:29:27 AM
Hi all,

I have a union query from relational DB - product, sale type(domestic, export) as rows. Quantity and Sale as measures. I union current month and Year-to-Date queries. I need to calculate price as Qty/Sale.
Problem is - the calculated price is not correct. I tried calculating price in each query, or calculate price in the union query, both get different kind of incorrect results.

Help please!
Thank you.
Title: Re: Incorrect calculations in Crosstab
Post by: Lynn on 27 Aug 2012 09:55:35 AM
I think the union is the appropriate place to have the calculation.

Maybe it has to do with the aggregation properties in your union query. You could try to set the quantity and sale as total and set the price query item as calculated.
Title: Re: Incorrect calculations in Crosstab
Post by: JuliaM on 27 Aug 2012 10:05:32 AM
Oh so simple  :) Thank you Lynn, it worked!
Title: Re: Incorrect calculations in Crosstab
Post by: Lynn on 27 Aug 2012 10:08:23 AM
Yay! Glad it worked  :)