Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab: Calculated Field varies per Cross Tab Column

Status
Not open for further replies.

chaycka

Technical User
Jul 30, 2010
1
US
Hello all,

I had been battling this problem for 3 days now and I am hoping I can get some help here. I am new to Cognos so I my problem might be easy to fix or impossible to implement.

I have a cross tab, that list the following:

QT1 QT2 QT3 QT4 Half1 Half2 Sum
Revenue 10 5 6 7 15 13 28
Margin 3 2 1 3 5 4 9
GP 30% 40% 17% 43% XX% XX% 32%

Both QT and Half columns are created via Case statement as buckets to put my data in.
Margin is calculated as "Revenue - Cost"
GP is calculated as "total([Margin] for [QT]/total([Revenue] for [QT])"

The GP for QT column returns correct value, however the GP for Half column, obviously, returns incorrect value.

What can i do so that I can have GP Calculated DataItem return
"total([Margin] for [QT]/total([Revenue] for [QT])" for all QT columns
and
"total([Margin] for [Half]/total([Revenue] for [Half])" for all Half columns?

Or maybe there is another way to do this?

Thank you very much in advance for your help

Natalya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top