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

Issue with a calculation in FM

Started by WEP, 21 Feb 2017 02:14:16 PM

Previous topic - Next topic

WEP

Hello everyone,

I'm trying to create a new query item under a query subject that is a simple calculation of A / B = C. A & B in the calculation are both query items under the same query subject and the data type for both of them is an integer. I put in the calculation under the new query subject and receive no errors. I publish the package and once I check the results in report studio the calculation is incorrect.

I am able to get other calculations to work correctly such as A + B = C, but when I try this one it is not working. Any help would be appreciated. Thanks!

CognosPaul

A + B = C is an additive measure. sum(a)+sum(b)=c = sum(a+b)=c

A / B = c is a NON additive measure, so sum(a)/sum(b)=c sum(a/b)=c

In report studio you can set the solve order to 2 (or higher if needed).

Try creating your calculation as a stand-alone, instead of inside a query subject.


AnalyticsWithJay

What is the Regular Aggregate property set to for the calculation in FM? It should be set to 'Calculated'.

To add to what CognosPaul said...

When you said the Regular Aggregate property to 'Calculated', it will perform the aggregation specified on the items within the calculation first, and then perform the calculation (division in your case) on the summarized values.

So it will do sum(a) / sum(b), and not sum(a/b), which is what you're likely seeing. This is assuming the regular aggregate property on both A and B is set to SUM.

Note that Solve Order is only applicable to charts and crosstabs (where rows & columns intersect).