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

Creating query calculation to get diffrence between 2 columns

Started by saumil287, 19 Oct 2011 02:51:10 AM

Previous topic - Next topic

saumil287

Hi All,
I am using a query calculation in a list named Month_Ly_var
Which is a difference of current_month and samemonthLY
ie(current_month - samemonthLY)
the result showing wrong results for the same column.
Your guidance will be appreciated.
thanks in advance

MFGF

The issue is probably the timing of the calculation. Reports automatically group and aggregate data, and you can quite easily get different results depending on whether you perform the calculation before the default aggregation and aggregate the calculated results, or perform the calculation after the default aggregation using the aggregated values displayed in the report.

The way this is controlled is by where you bring in the items from for use in your expression.  If you drag in the items from the package, the timing is before aggregation, whereas if you drag in the items from the query the timing is after aggregation.  It is easy to see which has been done just by looking at the expression - items from the package will have a fully qualified name [Namespace].[Query Subject].[Query Item] whereas items from the query will have a simple name [Query Item]

Hope this helps!

MF.
Meep!

saumil287

Hi MFGF,
I am getting the wrong results in FM only and the same in report studio.
I created a new query item named YTD in FM which is the addition of 2 query items named feb11 and jan11which cotains a revenue data.
The results of feb11 and jan11 is displaying wrong in ytd.
I want to know what should I set the regular aggregate property for ytd query item the defalt is showing sum.
Thanks