COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Raghuvir on 19 Sep 2013 03:47:47 AM

Title: Calculations in crosstab reports
Post by: Raghuvir on 19 Sep 2013 03:47:47 AM
Hi,

i have to add a calculated filed in my crosstab report.

Please find the attached image for the requirement
Title: Re: Calculations in crosstab reports
Post by: adik on 19 Sep 2013 03:52:11 AM
just drag over a query calculation from the toolbox and type in your formula
Title: Re: Calculations in crosstab reports
Post by: Raghuvir on 19 Sep 2013 04:07:43 AM
hi,

could you help me with the formula
Title: Re: Calculations in crosstab reports
Post by: Satheesh on 19 Sep 2013 04:47:46 AM
Hi Raghuvir,


Calculated means how u want...???
what is calculated...??? is there any formula you applied on camping Equipment....???




May be U want to like this...
You want only Camping Equipment and Golf Equipment...... separately do the Following


In Query
Drag Data Item and write the Formula like below and Make this data item name as Camping Equipment


if([Product Line]='Camping Equipment') then
( [Qty] )
else
(0)






- Sateesh
98672 00664









Title: Re: Calculations in crosstab reports
Post by: rajasekharbathala on 19 Sep 2013 05:01:35 AM
Hi,

create three data items
data item1 is GE as
case when [Product] = ('GE') then
([Unit cost]) else (0)
end
and data item2 is
case when [Product] in ('CE') then
([Unit cost]) else (0)
end

data item3 is GE/CE as total([GE] for [Year]) / (total([CE] for [Year]))

add GE/CE data item to the right side of the crosstab.

Regards
Bhaskar.