COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: krogovin on 31 May 2006 07:56:13 PM

Title: percentage formulas in ReportNet
Post by: krogovin on 31 May 2006 07:56:13 PM
I am currently trying to use a percentage formula in a ReportNet report, which uses a cube.  I have 5 columns in this report:

Product  Year1Qty   Year2Qty  % of Year1   %of Year2


It is the last two columns which are causing me some grief.  In the past, I would just use the formula percentage(X) and the percentage of column X would be generated.  Now, the percentage which is being generated is based on both of the qty columns.  I think it has something to do with the cube properties but I would appreciate any suggestions or tips.

Thanks!


Title: Re: percentage formulas in ReportNet
Post by: BIsrik on 01 Jun 2006 06:52:46 AM
i couldn't get percentage on both qty. Is that ur formulae is something like this (year1qty/(year1qty+year2qty) for % of year1 and similarly to % of year2

Srik
Title: Re: percentage formulas in ReportNet
Post by: bdybldr on 01 Jun 2006 09:24:50 AM
I don't understand your requirements.  What are you trying to calculate as a % of Year1 and Year2?  Please share the formula you're trying.
Title: Re: percentage formulas in ReportNet
Post by: krogovin on 01 Jun 2006 12:10:16 PM
Sorry..I wasn't clearer..imagine the report to look like this:


Product   Year1Qty   Year2Qty   Year1%  Year2%
ProductA  1000         2000          .5           .5   
ProductB  1000         2000          .5           .5
Total         2000        4000           1            1

The Percentage columns are describing what Product A represents to the Total, not the growth rate for one year to the next year.

In the past, I could use percentage(Year1Qty) and I would get the value.

Thanks!
Title: Re: percentage formulas in ReportNet
Post by: bdybldr on 05 Jun 2006 12:14:27 PM
Year1% = total(Year1Qty for [Product])/ total(Year1Qty for report)

Try this and let us know how it goes.  Let me know if you have any questions.

Good luck.