Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

How to create a Ratio in Cognos Report studio Reports?

How to create a Ratio in Cognos Report studio Reports?..

RATIO_TO_REPORT

This rank function calculates the ratio of a value to the
sum of the values for the entire set.
Syntax

RATIO_TO_REPORT( numeric )

Parameters

*

numeric-- Any numeric data type expression, typically
a reference to a numeric column.

Return Type

DOUBLE PRECISION.
Remarks

Returns a number for each row in the set that is the row’s
ratio to the sum of the entire set. When expression results
in NULL, the function returns NULL. When the sum of the set
is zero (0), the ratio is also zero.

Note: This function cannot be used as an argument in a set
function, moving set function, or rank function. For
example, SUM(RATIO_TO_REPORT(...)) is illegal.
Example

Determine what percentage each product sales is to the total

SELECT prod_description DESC,

SUM(dollars) as sales,

RATIO_TO_REPORT( SUM(
li_amount )) * 100 AS ratio_dollars

FROM lineitem, product

WHERE lineitem.li_prod_id = product.prod_id

GROUP BY prod_description;

DESC SALES RATIO_DOLLARS

Widget 896931.15 12.88

Football 507022.35 7.28

Oil Drum 503493.10 7.23

Computer 437863.00 6.29

Chair 429637.75 6.17

Desk 424215.00 6.09

Mesh Bag 421205.75 6.05

Shoelace 417261.00 5.99

Powder 397102.50 5.70

Telephone 394086.50 5.66

Cord 392377.75 5.64

Mouse 389378.25 5.59

Monitor 305859.75 4.39

Case 294982.75 4.24

Cup 236772.75 3.40

 Is This Answer Correct ? 2 Yes 0 No

More Cognos Interview Questions

How can I disable the drill-down for the last level of my dimensional hierarchy ????

what was the actual purpose of portfolio in cognos ?

how to test reports in cognos?

How to change Boolean variable Yes As "TRUE" and No as "FALSE" in Cognos reporting studio?

Hi..I have COG-112(Report Author),COG-122(Admin),COG-132(Meta data modelling). I took test end of Sep '09.I got 100% wcore with these dumps. If any body need then mail me on kris.bi121@gmail.com

What is the difference between static and dynamic conditions?

how u create security to reports ????

Where do i get Cognos 10 BI Online Training in Low price for the below tools. Cognos Framework Manager Cognos Report Studio Cognos Query Studio Cognos Analysis Studio Cognos Event Studio Cognos Transformer Cognos TM1 Development

what is the difference between filter and condition?

----------0Diff b/w Report Functions and Database functions?

I want to schedule the report as sysdate-1.....how to do

Helow, i have a problem with runing-total function when i use it for a calculate row (for example : i need to diplay a running-total of total units ?)

Categories