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

Calculate on detail level before summary

Started by Bakkone, 27 Jun 2015 06:05:11 AM

Previous topic - Next topic

Bakkone

Hello,

How do I make Cognos BI calculate a data item on the lowest detail level before summing up the result?

Consider the following crosstab.


OrganisationABA*B
Total1.210001200
CostCenter 10.4300120
CostCenter 20.8900720

How do I get the A*B on a total level to sum the underlying values (120, 720), instead of calculating its own information? Im trying different combinations of Aggregate(), total() and writing the entire calculation within the A*B instead of picking up separate data items. But for some reason I can't get this  to work.

This is probably a really simple thing. But what am I missing? It seems to me that this should be the standard behaviour.

Hope you can help a new guy out.



Lynn


Bakkone

Thank you.

I still couldn't get it to work even after trying all sorts of different combinations of solve order, aggregation types and totals. I think there is something wrong with the cube Im getting my data from.

But thanks for the help!

Regards
David

gpollock

One thing to remember is the aggregate rules.  For example, price*Qty looks fine in detail, but when summing up will do total(price) * total(qty), which is what you don't want.

Here are some things to experiment with.  In your query, create a column to handle A*B, and set its aggregates to be Total.  It looks like it's currently set to automatic or Calculated.  If you don't want to try that, find the underlying query item that represents the total row.  Try to change it to something like total(A*B).  Wrapping it in a total() should tell Cognos to perform the calculation at the detail level, then sum it up to whatever level you're running your summary.