Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to create a Ratio in Cognos Report studio Reports?



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

Answer / the_xxx

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
sales of all products for the last 20 weeks:

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

Basket 514830.00 7.39

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

Post New Answer

More Cognos Interview Questions

What is the concept of using Dimension allocation "By Measure"? How Transformer use when computing the Base measue?

0 Answers   IBM,


What is the diff between Drill through reports and Master detail reports?

2 Answers   CSC, TCS,


How can we give the same color for alternate(1,3,5.... and 2,4,8...) cells in a column?

5 Answers   CTS,


1)How can we do the Union in Report Studio? 2)What is the meaning of Aggregation and Rollup Aggregation? 3)How can we hide the columns in Report Studio and How can we view the hiding Objects? 4)Can we provide joins in Report Studio and in which situation we can go for outer join? 5)If we take a Date Prompt and run it once it will show default data,how can we change it exact 1 month back data?

1 Answers  


What are the different kinds of panes included in cognos?

0 Answers  


what are the dimensions that you have in your current project?list them?

0 Answers   IBM,


What is difference between data mart and data warehouse?

0 Answers  


Can you define drill across?

0 Answers  


what are the types of scheduling and what are the errors faced while scheduling then how to solve those errors?

1 Answers   Dr Reddys, TCS, Thomson Reuters,


What is the difference between drill through, drill across?

0 Answers  


How to test reports in cagonos ?

10 Answers   CST, CTS,


what is the different between primarykey and surrogated key.. why we are going for surrogatekey...

1 Answers  


Categories