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

how can i get diifrence between two data items in footer

Started by bvk.cognoise, 02 Mar 2011 10:40:39 PM

Previous topic - Next topic

bvk.cognoise

hi i have report like

product             revenue
a                       400
b                       200


in footer of revenue i need difference between' b 'and' c like

product             revenue
a                      400
b                       200
difference          200

please solve this issue .appreciate your help


Regards
BVK

PRIT AMRIT

Create 2 Calculated Data Items

[Data Item A]: Case when [Product]='a' then [Revenue] end
[Data Item B]: Case when [Product]='b' then [Revenue] end

In properties, set Aggregate Function as 'TOTAL'

Create another Data Item [Difference]: [Data Item A]-[Data Item B]
In properties, set Aggregate Function as 'Calculated'

Select, Product column in you list report, then Create a Footer, unlock the report and drag [Difference] into it.

Thanks
Prit

bvk.cognoise

hi
appreciate your help.but I'm not getting exact out put.when I'm trying to do this I'm getting sum of 'a' and 'b' .will you please explain me where I'm doing mistake
Regards
BVK

PRIT AMRIT

It's just straight forward as I explained in my last post.

Do you mean you are getting error or incorrect result?


bvk.cognoise

yes .

for eg:

year            revenue
2004           1000
2005           3000
2006           4000
2007           2000


this is my report .i want to see difference between 2004 and 2006 revenue in footer.how can i do this.i do the same thing what you explained before.but I'm getting incorrect  value.
please solve this.very much appreciate for your quick reply.
Regards
BVK

PRIT AMRIT

QuoteCreate 2 Calculated Data Items

[Data Item A]: Case when [Product]='a' then [Revenue] end
[Data Item B]: Case when [Product]='b' then [Revenue] end

In properties, set Aggregate Function as 'TOTAL'

Create another Data Item [Difference]: [Data Item A]-[Data Item B]
In properties, set Aggregate Function as 'Calculated'

Can you try like this:total([Data Item A])-total([Data Item B])

Hope this should do?

Thanks
Prit

bvk.cognoise

i used same process.i want to know 2005-2004 revenue diffrence.please solve this issue.
Regards
BVK

bvk.cognoise

hi Prit,

its working  :D thank you very much for your quick reply.awesome,

thanks
krishna.dwhc
Regards
BVK

barrysaab

Boy! Cognos getting on to me!!!