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

Percent of total (while using calculated data items)

Started by charon, 16 Oct 2012 11:25:17 AM

Previous topic - Next topic

charon

Hi Guys :)
IM wondering, how can i calculate the percentage of a total in a list report, when the facts are calculated items?
I remember in analysis studio, i can right click on the crosstab corner and tell him to aggregate in percent. But how do i get this effect in Report Studio?

Environment:
Report STudio 8.4
DB = DB2

This is the scenario

A normal List (using the ibm demo database)

         Column 1                 Column 2                  Column 3                 
         Product Type           Amount (fact 1)         Price per piece (Fact 2)

What i want is to create 2 new facts and an aggregated data item, "Amount * Price per piece" as Fact 3,
then for each product row aggregated the Fact 3 (the calculated fact) and then, based on the total amount of fact 3 (means for ALL product Types together, a total fact 3) the fact 3 in percent of the total amount. The TOTAL ROW is an automatic aggregation, and delivers the total information for the "Percent of Total" calculated fact.


       Product type             Amount             Price per piece           Amount*price p.p.       Percent of total[/color]
         Knives                           5                              10                           50                                50/ 200 = 25 %                                 
         Forks                             10                            15                           150                            150 / 200 = 75%
____________________________________________________________________________________
Total                                        15                          12,5                          200


It does not work for me....any ideas how to realize that? I have created the calculated items, but i dont know how to use / where to get the total from.
Used the total row (which cognos created after clicking the aggregation button) data item, but i dont get results :S

Any ideas appreciated.
Cheerz :P



MFGF

Hi,

How about a query calculation which is coded as:

[Your calculated column 3 from the query] / total([your calculated column 3 from the query] for report)

Does this give you what you need?

MF.
Meep!

charon

Thx MFGF for your reply...wasnt able 2 test it because an "emergency" case...
still, i think as simple as it is it will solve my issue.

Thx a lot and...hf on the IOD :D
cheerz :P