COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: mitwa on 10 Jan 2014 02:01:04 AM

Title: I NEED OUTPUT IS LIKE BELOW
Post by: mitwa on 10 Jan 2014 02:01:04 AM
     I NEED OUTPUT IS LIKE BELOW
we can get it by union of two queries but i dont know how???
                                    Actual (A)
                                    Q3 2009
                                    ---------------
total revenue                  $70,359

Cost of Goods Sold     43,733

PRETAX                          26,626
                                     37.8%

Overhead Expenses     18,089
                                      25.7%

  Operating Margin       8,537
                                      12.1%

GROSS MARGIN             8,555
                                     12.2%

EBITDA                           5,285
                                        7.5%

from the above i know how to take Total Revenue,Total COGS,PRETAX,Overhead Expenses,Operating Margin,GROSS MARGIN
,EBITDA but i dont know how to get that % columns..formula for tht % columns is like gm= gm/revenue
Title: Re: I NEED OUTPUT IS LIKE BELOW
Post by: Sridhar Vuppugalla on 10 Jan 2014 03:09:33 AM
Hi,

If you have two different Queries, we need take no of query items in both queries then give it to same name for query items in both the queries. Then u union the both queries.
Title: Re: I NEED OUTPUT IS LIKE BELOW
Post by: mitwa on 10 Jan 2014 05:42:40 AM
thanks for responding.. but i think you are not understanding my requirment..to get that percentages we can get it by using crosstab or else we have to go through unions...problem s i dont know how to solve in both the ways
Title: Re: I NEED OUTPUT IS LIKE BELOW
Post by: colt on 10 Jan 2014 08:00:49 AM
I guess most probbly you are looking for a dataitem:

gm=gm / total(Revenue); Maybe you have  to use gm=gm / total(Revenue within set Q3/2009)
Title: Re: I NEED OUTPUT IS LIKE BELOW
Post by: mitwa on 11 Jan 2014 12:13:59 AM
no problem with dataitem, i gave it as

for dataitem1:

CASE  WHEN [KPI]='PRETAX' THEN [Actual(A)]
            WHEN [KPI]='Overhead Expenses' THEN [Actual(A)]
            WHEN [KPI]='Operating Margin' THEN [Actual(A)]
            WHEN [KPI]='GROSS MARGIN' THEN [Actual(A)]
            WHEN [KPI]='EBITDA' THEN [Actual(A)]
            END

for dataitem2:

case when [KPI] in ('Total Revenue';'Total COGS';'PRETAX';'Overhead Expenses';'Operating Margin';'GROSS MARGIN';'EBITDA') then ('Total Revenue') end

for dataitem3:

[Data Item1]/[Data Item2]


but i am not getting the output. dont know y..pls help me
Title: Re: I NEED OUTPUT IS LIKE BELOW
Post by: Francis aka khayman on 12 Jan 2014 08:33:43 PM
first questions that should always be asked... are you using DIMENSIONAL or RELATIONAL?
Title: Re: I NEED OUTPUT IS LIKE BELOW
Post by: mitwa on 15 Jan 2014 02:11:06 AM
It is an relational package.

thanks for everyone i got near by output..

now my report is look like     

total revenue                  $70,359
                                         20%

Cost of Goods Sold        43,733
                                          10%

PRETAX                           65,486
                                          22%

Overhead Expenses         34,535 
                                          66%

now the problem is i dont need those % values for only total revenue and  Cost of Goods Sold.
* using static choice how to remove this..
* (remember that those total revenue ,  Cost of Goods Sold, PRETAX , Overhead Expenses are in kpi )