Average of two pivot table columns in a 3rd pivot column??

Is there a way to calculate the average (sum of C2/Sum of C1) and have it show in C3 of a pivot table?

If I create narrative view it will be another view. And if I put that in between that two pivot view, it will show the space. I need to remove space between two pivot table within a single report so that it can appear as a single pivot view.
Thanks

Similar Messages

  • Pivot table with very large number of columns

    Hello,
    here is the situation:
    One table that contains raw data; from this table I feed one with extract information (3 fields); I have to turn the content in a pivot table
    Ro --- Co --- Va
    A A 1
    A B 1
    A C 2
    B A 11
    Turned in
    A B C...
    A 1 1 2
    B 11 null null
    To do this I do a query like:
    select r, sum(decode(c,'A',Va) COLA, sum(decode(c,'B',Va) COLB , sum(decode(c,'C',Va) COLC,.... sum(decode(c,'XYZ',Va) COLXYZ from table group by r
    The statement is generated by a script (cfmx) and it works until I reach a query that try to have 672 values for c; which means 672 columns...
    Oracle doesn't like that: ORA-01467: sort key too long
    I like this way has it is getting the result fast.
    I have tried different solution a the CFMX level with for that specific query, I got timeout (query table with loop on co within loop on ro)
    Is there any work around?
    I am using Oracle 9i.
    Tahnk you!

    insert into extracted_data select c, r, v, p from full_data where <specific_clause>
    The values for C are from a query: select disctinct c from extracted_data
    and it is the same for R
    R and C are varchar2(3999)
    I suppose that I can split on the first letter of the C column as:
    SELECT r, low.cola, low.colb, . . ., low.colm,
    high.coln, high.colo, . . ., high.colz
    FROM (SELECT r, SUM(DECODE(c, 'A', va)) cola, . . .
    SUM(DECODE(c, 'M', va)) colm
    FROM table
    WHERE c like 'A%'
    GROUP BY r) Alpha_A,
    (SELECT r, SUM(DECODE(c, 'N', va)) coln, . . .
    SUM(DECODE(c, 'Z', va)) colz
    FROM table
    WHERE c like 'B%'
    GROUP BY r) Alpha_B,
    (SELECT r, SUM(DECODE(c, 'N', va)) coln, . . .
    SUM(DECODE(c, 'Z', va)) colz
    FROM table
    WHERE c like 'C%'
    GROUP BY r) Alpha_C
    (SELECT r, SUM(DECODE(c, 'zN', va)) coln, . . .
    SUM(DECODE(c, 'zZ', va)) colz
    FROM table
    WHERE c like 'Z%'
    GROUP BY r) Alpha_Z
    WHERE alpha_A.r = alpha_B.r and apha_a.r = alpha_C.r ... and alpha_a.r = alpha_z.r
    I will have 27 select statement joined... I have to check if even like that I will not reach the limit within one of the statement select
    "in real life"
    select GRPW.r, GRPW.W0, GRPC.C0, GRPC.C1 from
    (select r, sum(decode(C, 'Wall, unspecified',cases)) W0 from tmp_maqueje where upper(C) like 'W%' group by r) GRPW,
    select r,
    sum(decode(C, 'Ceramic tiles, indoors',cases)) C0,
    sum(decode(C, 'Cement surface, outdoors (Concrete/cement block, see Structural element, A11)',cases)) C1
    from tmp_maqueje where upper(C) like 'C%' group by r) GRPC
    where GRPW.r = GRPC.r
    order by GRPW.r, GRPW.W0, GRPC.C0, GRPC.C1
    Message was edited by:
    maquejp

  • Crosstab two joined tables multiplies the data in each column ....

    below is code that crosstabs monthy sales numbers and totals for each month.  So what I need to do is add a column that totals last years sales (table will be called [2013]) and add a column called 2013 YTD. I also need to add a calculation column that
    calculates growth from one year to another. So I join the 2013 table and add one last line that sums 2013 sales but i need only Jan-Mar at this point. in other words I just need to see the total sales for each dealer from 2013 Jan-Mar while still viewing Jan-Dec
    for the current year. So looking at the end product I need to see the Dealer Info, Jan, Feb, Mar, Apr......and at the end 2013 Sales and Growth. Thus, the Where clause. Unfortunately, each months sales are multiplied x 3 with or without the 2013 sum line.
    As soon as I join the tables the numbers get multiplied.
    What am I missing??????
    SELECT    
    substring([2014].Dealer,18,50)AS
    [Dealer Name],substring([2014].Dealer,9,1)AS
    [District],substring([2014].Dealer,11,6)AS
    [Dealer Code],
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 1 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Jan,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 2 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Feb,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 3 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Mar,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 4 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Apr,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 5 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS May,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 6 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Jun,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 7 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Jul,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 8 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Aug,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 9 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Sep,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 10 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Oct,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 11 THEN
    [2014].[Sales Count]
    ELSE 0 END)
    AS Nov,
    SUM(CASE
    WHEN [2014].[Transaction Sales Month]
    = 12 THEN
    [2014].[Sales Count]
    ELSE 0 END
    AS
    Dec,
    SUM([2014].[Sales Count])
    AS [2014 Total],
    FROM        
    dbo.[2014]
    GROUP
    BY substring([2014].Dealer,18,50),substring([2014].Dealer,9,1),substring([2014].Dealer,11,6)

    This needs to be moved to Transact-SQL forum. You may want to post DDL of your tables, some input data (as insert statements) and desired output.
    In the meantime I think you'll find this blog post helpful:
    Aggregates with multiple tables
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Calculate a daily average in pivot table view

    I am new to biee 11g and would appreciate any assistance with the following.
    I have a pivot table view which includes a hierarchy column and a single measure, units. The pivot is filtered based on date that is prompted.
    I need to include a column in my pivot table that displays the average unit sales for the period being displayed based on working days. ie total units for the period divided by the number of working days in the period selected. The date dimension contains a flag indicating whether a date is a working day or not.

    Measure Columns can't be hidden like an attribute. How ever you can use custom style sheet for Value and Header Properties to not show the measure.
    for the "Custom CSS Style Options (HTML Only)" under measure properties of the column set "Use Custom CSS Style" value to 'display:none'.
    Let me know if this worked.
    Regards,
    Jay

  • Two pivot tables in one report - obiee 11.1.1.5

    Hi experts!
    Is possible to do a two pivot table (EACH with DIFFERENT CALCULATED ITEMS)??
    For example:
    Pivot table:
    Calc1
    Calc2
    Calc3
    (Hide all other members dimension, only show 3 Calc items)
    Pivot table2:
    Calc5
    Calc6
    Calc7
    (Hide all other members dimension, only show 3 Calc items)
    Now...If I change one calc, it changes for all pivot tables in my report... :(
    Thanks!!!
    Edited by: Alex1 on 22-sep-2011 9:44

    Hi!
    I can't create my calcs in column criteria.
    When I create calc items in first pivot table and create a second pivot table, I have this calcs...and I want another calcs in second pivot table...

  • How to extend No. of columns for PIVOT table in BI Publisher Desktop

    Hello Everyone,
      I am using the Oracle BI Publisher Desktop to design the TEMPLATE for Oracle Reports.
    I need to create the PIVOT table .In my PIVOT table I need to display 9 columns but when I tried to create PIVOT table by dragging 9 columns only first 4 columns are displaying in report.
    Can anyone suggest me how can I increase the number of columns in PIVOT table?
    Thank You.
    Regards,
    Guru.

    hi jim
    if you carefully look inside the form field's you will find the logic of sort . if you remove that you will get the data without any sorting order.
    else send me your template and xml to my email id i can look into that .
    email : [email protected]

  • How to Sort Dimension in Pivot Table via Order Column which is changing like Factual values

    Hi,
    Recently in of our product offerings we got stuck on this following question:
    How to Sort Dimension based on the Order Value which Keeps Changing with Factual Values??
    We have a data source laid out as (example)
    In the above the “Order” columns are changing per
    Company/(DimensionA) for DimesnsionB.
    Instead what we want is: (But only if we can get the following result without putting the “Order” Column in the “Values” Section. 
    If there are any configurations that we can make to our power pivot model for the similar data set so that the
    DimesnionB in this case can be sorted by the Order column, would be greatly helpful to us. 
    Sample File:
    http://tms.managility.com.au/query_example.xlsx
    Thanks
    Amol 

    Hi Amol,
    According to your description, you need to sort dimension members in Pivot Table via order column, and you don't want the order column show on the Pivot table, right?
    Based on my research, we can sort the data on the Pivot table based on one of the columns in that table, and we cannot sort the data based on the columns that not existed on the Pivot table. So in your scenario, to achieve your requirement, you can
    add the column to pivot table and hide it.
    https://support.office.com/en-gb/article/Sort-data-in-a-PivotTable-or-a-PivotChart-report-49efc50a-c8d9-4d34-a254-632794ff1e6e
    Regards,
    Charlie Liao
    TechNet Community Support

  • Increasing the width of Pivot table Columns

    Hi Gurus,
    Small pivot table --> ( ie having less no of columns which generally can be seen in a single page without scrolling to the right)
    If i have a small pivot table , then in the column properties through additional formatting options i can increase the width of an individual column.
    However if the pivot table is Big,I am not able to increase the width of the individual column .
    I tried setting width in the additional formatting options in the Content Properties( just above Rows and below Section there is a small grey box containing finger).
    Now the Content Properties indeed increases the width of the column, but it also increase the width of the whole Pivot Table.
    See...If i have a fixed number of columns in a PIVOT Table that do not change with prompt, then this solution work fine...
    but the problem comes when the no of columns in pivot Table reduces based on the prompt selected.
    In this case the less no of columns tries to occupy the whole width set in the content properties.
    In short, with Content Properties the width of the PIVOT Table becomes fixed, irrespective of the no of columns coming.
    Also after setting content properties, I am not able to print the report to PDF.
    So the Question is... Can we increase the width of a Big Pivot Table whose no of columns keeps on changing based on the prompt....
    Big pivot table -->
    (ie table having no of columns which exceeds a single window frame and have to scroll to right to see the rest of the columns)
    I hope i have not made things messy...
    Thanks
    Ashish

    Ashish,
    Yes, you can set a fixed size for these. I'm sure you are fixing these because of PDF issue which might be irregular in sizes. Just play arnd with Custom CSS options.

  • Duplicate fact column  as percentage in pivot table.

    Hi,
    I created duplicate fact column set as percentage in pivot table.
    Duplicate column not visible for graph generation.My requirement is need to use percentage column for graph .
    How to achieve this.kindly let me know.

    Thanks for reply.
    Sorry if im not clear.
    Here is my requirement.
    1.In my report contains 2 columns.
    2.Example - year,count.(Here- Count is fact)
    3.I make the count as duplicate column and set as percentage.
    4.If i create graph in pivot table itself then graph contains 3 column information i.e.,Year,Count,% Count.
    5 Here i unable to hide/remove original count column.
    My requirement is my graph has to contains 2 column information i.e., Year,%Count.
    How to achive this.kindly let me know.

  • Calculated Percentage Columns in Pivot Table loose formating in Excel

    I have a simple report built using pivot table ( OBIEE 11.1.1.5.0)
    1 Metric and 1 dimension using pivot table. and I duplicated the metric column and change it to % column.(Show data as % of column). SO far so good. Below is the snapshot
    http://tinypic.com/r/2s14xa9/7
    Now i download the report in excel and all the % values are messed up . Below is how it looks
    http://tinypic.com/r/bede90/7
    I tried messing with data formats etc..nothing works.. I cannot add a custom column format to the metric column since it will impact the derived % column.
    Is this a bug ?Any pointers ..
    Thanks

    Hi,
    Follow up this SR:
    SR 3-5060435331: Calculated Percentage Columns in Pivot Table loose formating in Excel
    Workaround: (not sure may be give a try)
    also give a try like below one then try to download it may work.
    In that % column -->add the below statement in the Custom CSS section of the column properties:
    mso-number-format:"\@"
    Refer snapshot here:
    http://i53.tinypic.com/a09kqv.jpg
    This will treat the data in the column as text while downloading to excel, hence retaining any leading or trailing spaces.
    Thanks
    Deva

  • Fixing the width of a column in a pivot table.

    Hi,
    I have a report with a pivot table view.
    In that pivot table i have a column called category and a measure called Amount.
    My issue is, i need to fix the length of the the measured column to particular extent like $111,111,111,111.11 (Bold) for all the columns.
    I went to Format Values for that column and add width=50 in the additional charting options.
    But it's not reflecting for all the columns.
    Is there any other way to resolve this one.
    Thanks,
    chinna.

    Hi,
    Thanks for the quick response.
    I tried to fix the width of a column by putting 20% ,30% ....suggested by you.But it's not reflecting in the report.
    is there any other way?
    thanks,
    chinna

  • Required Help in Pivot Table

    Dear
    i am working on BI Publisher Desktop Version and trying to generate a RTF Template in which pivot table has to be used
    Below is the format of my XML File.
    -<G_C1>
    <R>1</R> row 1
    <C>1</C> column 1
    <C1>1300001 ASL 112531 2</C1>
    <C2>1 10 1.5</C2>
    <C3>120000105 12.5</C3>
    <C4>120000105 </C4>
    <C5>OPeration</C5>
    </G_C1>
    -<G_C1>
    <R>1</R> row 1
    <C>2</C> column 2
    <C1>1300001 ASL 112531 2</C1>
    <C2>2 10 1.5</C2>
    <C3>120000106 12.5</C3>
    <C4>120000106 </C4>
    <C5>OPeration</C5>
    </G_C1>
    -<G_C1>
    <R>1</R> row 1
    <C>3</C> column 3
    <C1>1300001 ASL 112531 2</C1>
    <C2>3 10 1.5</C2>
    <C3>120000107 12.5</C3>
    <C4>120000107 </C4>
    <C5>OPeration</C5>
    </G_C1>
    ......... and sow on till row 16 and column 8
    i am facing two issues,
    first i have to show 5 columns in cross product, but pivot table option shows option for 4 columns only
    secondly characters are not shown when i preview the template its shows 'NnN' in all columns
    Kindly help me in generating the template.
    I have to define the template in XML Publisher of Oracle E-Business Suite R12
    Regards,
    Muhammad Usman

    check these samples
    http://winrichman.blogspot.com/2008/08/pivot-table-cross-table-with-fixed.html
    and
    https://blogs.oracle.com/xmlpublisher/entry/new_skool_crosstabbing
    i will let you if i know i get anything.

  • Inlcude the table heading in Pivot Table.

    Hi,
    Can we include the table name in the Pivot tables as well along with the Column names as we can do in the Table view where we can show 'Display Column & Table Headings' as seperate rows.
    Regards,
    Bhavik

    Ok, for example take two columns product and revenue. Consider they are 10 products.
    What I have to display in report is 9 products with revenue and total revenue of those 9 products and then the 10th product and revenue and finally the grand total.
    Product---Revenue
    1---35
    2---45
    9---60
    Total---140
    10---70
    Grand Total---210
    Which can be achieved the same in pivot view (using New calculated item)
    I also need to display the table headings, there I stuck with.

  • Pivot table problem. Please help me create this report

    Hi friends..I'm new to OBIEE. We can create the grand total column in pivot table. I need grand total as well as Grand average. How can I create a new column in pivot table that is same as grand total but calculates average.
    My table structure is like this.
    Facility......Date........totaldays
    A..........01/01/08......210
    B..........01/01/08......215
    C..........01/01/08......917
    A..........02/01/08......211
    B..........02/01/08......211
    C..........02/01/08......911
    A..........03/01/08......210
    B..........03/01/08......215
    C..........03/01/08......917
    I need the report like this..
    Facility.....01/01/08......02/01/08....03/01/08...Total....AVG
    A...............210.............211............210.....631......210.3
    B...............215.............211............215.....641.....213.6
    C...............917.............911............917.....2745....915
    For this report..I created pivot table but I'm not able to calculate the average..
    Can you please help..I'm new to OBIEE...
    Thanks in advance

    Please change your username....
    Here is what you need to do...
    1) In the Pivot Table View, click on the Measures column and select New Calculated Item.
    2) In the pop-up window complete as follows:
    Name: type "Total Average"
    Function: Select "Average" from the drop-down window.
    Click on the values in the right pane that you wish OBI to calculate the average for.
    3) Click "OK."
    You now have another column that is the average of the values in each row.

  • More on the pivot table processing in coherence

    hello, all:
    I posted a question regarding how to create a pivot table in coherence (coherence and pivot table
    Now I am on a project that my mgr wanted me to query a coherence cache and return a subset in "pivot" structure.
    Suppose I send a request from the client with these info: String[] rows, String[] columns, String[] data. Each of them represent rows area, columns area and data area as in a Excel table. The aggregation is limited to sum for now.
    I managed to create some code like this:
    public Map<Object, Object> sum(Filter filter, String properties, String[] targets){
              EntryAggregator[] entryAggregators = new EntryAggregator[targets.length];
              for(int idex = 0;idex<targets.length;idex++){
                   entryAggregators[idex] = new DoubleSum(targets[idex]);
              MultiExtractor me = new MultiExtractor(properties);
              EntryAggregator ca = CompositeAggregator.createInstance(entryAggregators);
              GroupAggregator ga = GroupAggregator.createInstance(me,ca);
              return aggregate(filter, ga);
         }here properties represent rows: "getX,getY,getZ" ; targets represent data to aggreated on: targets[] {"getA","getB"}
    There are two relevant questions:
    1. I am not able to put the columns info into the code;
    2. the return type above is Map<Object, Object> , printing map looks like
    +{[Parts, Appliance, Trash compactor],[214.5, 1.0]}...+
    with 3 rows (X,Y,Z) in the first segment, and aggreated 2 values (A,B) in the 2nd segment.
    how can I exact these values from a map structure (it seems the key/value are map themselves), and design a "pivot" structure to host them?
    I hope I've made myself clear.
    Thanks,
    Johnny

    Hi Johnny,
    Your question intrigued me so I thought I would do a bit of digging into how you might replicate a pivot table using aggregators. Well, it has taken me a few days and as it is quit a long subject I wrote it up on my blog rather than post it all in the forum http://thegridman.com/coherence/oracle-coherence-pivot-table-queries/
    You were on the right track with the GroupAggregator but there is a bit more to do to allow all the different combinations of rows, columns and values as well as filtering.
    I hope what I have written up is clear enough, just ask if you have more question.
    JK

Maybe you are looking for

  • Extended notifications: SWN_TEST_REMAP1

    has anyone come across this program? in configuring extended notifications there is a whole list of test programs but i haven't seen any guidance on when and how to run them. this one results in...nothing. is this a true negative or a false negative

  • Push Notifications and Battery Life

    If I have push notifications enabled, but no applications that use push notifications, will my battery still be drained?

  • Certificate can not be verified by JWS

    Hello, we developed a java web start application and bought an SSL certificate to secure the communication between the application and the servlet (_no_ self-signed certificate). Our intended java version is 1.5. The application jar is not signed. Wh

  • Problem with unavailable fonts haunting me

    Using Frame 11, I cannot create a PDF because of unavailable fonts. I dutifully change them to what the console says using the Character Designer. That works. But when I open the files back up later, the unavailable fonts message come back. I need so

  • ABAP Class to start Infopackage load

    I want to write a little interface that allows a non-tech user to provide a desktop file (.csv) allow a selection of filetype (sales, repair, historical, demand) and a button to start the load process. The file is then transfered to the BW system and