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

Problem in calculating a colmn of percentages

Started by katdbc, 24 Mar 2011 12:06:04 AM

Previous topic - Next topic

katdbc

I have two columns and in the  third column im performing a simple expression and I set as a percentage.

([PMR MONTHLY_CURR_PMR_BL]-[PY_PMR_YE_PREV_PMR_BL])/[PY_PMR_YE_PREV_RCS_PMR_BL] 

is the expression and im getting a perfectly wrong answers. If the answer is expected to be  10% it will be completely different as 14% or something.I seriously dont know whats wrong.

Is tehre anything to do with the properties.I have set their aggregation and roll up as automatic .If i change it to something else it gives me blank rows and verybad answers in rest.

Can someboday please help me.

I am a newbie to cognos.Kindly please bare with my silly doubts.

PRIT AMRIT

Quote([PMR MONTHLY_CURR_PMR_BL]-[PY_PMR_YE_PREV_PMR_BL])/[PY_PMR_YE_PREV_RCS_PMR_BL]

Try like this:
(total([PMR MONTHLY_CURR_PMR_BL])-total([PY_PMR_YE_PREV_PMR_BL]))/total([PY_PMR_YE_PREV_RCS_PMR_BL])

Make sure the data item aggregation function properties is set as 'Calculated'

Hope should work

Thanks
Prit

katdbc

Thank you for your prompt reply Prit.

but unfortunately didnt work out.

I have set them to calculated in the queryy(data Item). Should i do anything abou the roll up? I am really confused on how to use these.They behave very indifferently.It is such a simple expression and iam unable to do it.

Is there anyother suggestions? I have changed the column heading to dynamically change it to the current month,I did it by unlocking the report. Does it affect my calculations in any way.

PRIT AMRIT

Test the Query first through 'Tabular Data' and see if the Calculated Item gives you the correct result.

Click the Query-- Run Menu-- View Tabular Data