Pivot table subtraction row

Hi there,
Is it possible to subtract the values of two rows in a pivot table and show as the third row if we can assure that there will always be only two rows in the pivot table?
Pivot table view:
h2. Year  M01   M02   M03    Q01 Total_
*2009*    493    437    529    *1459*
*2010*    599    579    643    *1,821*
Problem: I am trying to generate another row in the bottom (In the place of Grand Total) and show the result of M01-M02.
Underlying data columns:
Year, Month, Quarter, #Orders
Underlying Filter: (this assures 2 years)
Year IN "Previous Year", "Current Year"
Version: OBIEE 10
thanks!
Edited by: obitime on Dec 28, 2011 9:45 PM

Instead of using a pivot table that way, create seperate measures using the filter function:
current year amt = filter(measure using year=[current year])
previous year amt = filter(measure using year=[current year] - 1)
change amt = filter(measure using year=[current year]) - filter(measure using year=[current year] - 1)
You may want to define [current year] using a prompt which sets a variable.
A second option is to write a formula like case when year = [current year] then 'Current Year' else 'Previous Year' end, and use that in your pivot table in place of Year. That way you can create your calculated item formula on something more dynamic.
Regards,
Robert

Similar Messages

  • Pivot table alternating row colors

    Hello,
    In ADF 11g, is it possible to format a pivot table so row colors will alternate? 1st row gray, second row white, 3rd row gray and so on..
    Can i determine which row is a DataCellContext object in ?
    Thanks.

    Any ideas ? I still could not find a way to give alternate row colors to a pivot table.

  • Percentage calculation in pivot table per row

    Hello all,
    I do calculate two fields in a pivot table. First calculated field is the # of activities per user (standard SoD reporting field). Second calculated field is the # of activities per user with a certain classification (customized pick list field that is converted in a from a text value to a integer value ==> CASE WHEN Activity.Type = 'Call' THEN 1 ELSE 0 END).
    In the pivot table I do show both vlaues as a sum. I would like to calculate the percentage per row per user.
    Example:
    User - # activities - # calls - percentage
    User XY - 80 - 40 - 50%
    Thanxs for your help
    Elmar

    have you # Call column look like
    sum(CASE WHEN Activity.Type = 'Call' THEN 1 ELSE 0 END) -- column2
    create the percentage column with # activities / column2
    under the column property of the percentage column --> Data Format -->Treat Numbers As --> percentage.
    leave the Aggregation Role as default on all columns.
    Hopefully, I didn't miss anything.
    Shilei

  • Above Average Conditional Formatting in Pivot Table off Row Total

    I have a pivot table where the months are column labels and the actual issues are Row labels. This is inverted from a normal pivot table where the months are usually the row labels.
    Basically I want the table to look at the value in the Values cells to look at the row Average instead of the column Average. Is there a way to do this?
    I've highlighted all my Value cells (showing the sum of the issue for a specific month) and then applied the Above Average conditional formatting selecting 'All cells showing "Average of #of Tickets" values for "Issue" and "Month".
    This works where the cells' value is greater than the columns average, but I want it to look at the row average instead.
    Is this possible? I thought it be simple, but I can't figure it out. The table will grow every month width wise and possibly adding new issues each month.

    Hi Vetsrini, thanks for the reply. I'm using the crosstab feature of BI Publisher template builder in MS Word to create the pivot table. I have a field called ACTIVITY as the row, and I want to bold the font and set the color as red if the ACTIVITY equals to certain text (such as if ACTIVITY = 'A' then bold & red). Can you please tell me how that can be achieved? I tried using the conditional formatting feature of the template builder, but it only works if I use it in a table, and not in pivot table.
    Thanks a lot.

  • Pivot Table - adding row header detail

    I've created a pivot table output using template builder for word plugin (10.1.3.4.2)
    xml
    <XXNCC_APEDI_3PINT>
    <P_FROM_DATE>2012-01-03T00:00:00.000+00:00</P_FROM_DATE><P_TO_DATE>2012-03-31T00:00:00.000+01:00</P_TO_DATE>
    <LIST_G_DELIVERY>
    <G_DELIVERY>
    <ESTABLISHMENT>Name1</ESTABLISHMENT>
    <INVOICE_NUMBER>028993A</INVOICE_NUMBER>
    <INVOICE_DATE>07-01-2012</INVOICE_DATE>
    <INVOICE_SORT>20120107</INVOICE_SORT>
    <INVOICE_PERIOD>Jan-2012</INVOICE_PERIOD>
    <AMOUNT>60.48</AMOUNT>
    <PRODUCT>D16</PRODUCT>
    <PRODUCT_DESC>PAST MILK SEMI CTN</PRODUCT_DESC>
    <ORDER_QTY>288</ORDER_QTY>
    <UNIT_COST>.21</UNIT_COST>
    <LINE_COST>60.48</LINE_COST>
    <LINE_UNIT>1</LINE_UNIT>
    <SERVING>200ML</SERVING>
    </G_DELIVERY>
    <G_DELIVERY>
    <ESTABLISHMENT>Name1</ESTABLISHMENT>
    <INVOICE_NUMBER>028993A</INVOICE_NUMBER>
    <INVOICE_DATE>07-01-2012</INVOICE_DATE>
    <INVOICE_SORT>20120107</INVOICE_SORT>
    <INVOICE_PERIOD>Jan-2012</INVOICE_PERIOD>
    <AMOUNT>61.74</AMOUNT>
    <PRODUCT>D17</PRODUCT>
    <PRODUCT_DESC>PAST MILK WHOLE CTN</PRODUCT_DESC>
    <ORDER_QTY>294</ORDER_QTY>
    <UNIT_COST>.21</UNIT_COST>
    <LINE_COST>61.74</LINE_COST>
    <LINE_UNIT>1</LINE_UNIT>
    <SERVING>200ML</SERVING>
    </G_DELIVERY>
    _______________________Date1_________Date2_______Date3___
    Establishment_______________________________________
    ___________Product______99__99.99___99__99.99____99__99.99__
    <crosstab:c547;"//G_DELIVERY";"ESTABLISHMENT{,o=a,t=t},PRODUCT{,o=a,t=t}";"INVOICE_DATE{INVOICE_SORT,o=a,t=n}";"ORDER_QTY,LINE_COST";"sum"?>
    All I want to do is add a new field after Product - Description.
    I've tried a number of combinations but nothing displays - and now I'm going in circles.
    Something to do with being within <?for-each:.//R2?> ?
    I can change the xml to do what I want but that seems un-necessary!
    Thanks in advance
    Edited by: GaryWW on 25-May-2012 03:29

    I've created a pivot table output using template builder for word plugin (10.1.3.4.2)
    xml
    <XXNCC_APEDI_3PINT>
    <P_FROM_DATE>2012-01-03T00:00:00.000+00:00</P_FROM_DATE><P_TO_DATE>2012-03-31T00:00:00.000+01:00</P_TO_DATE>
    <LIST_G_DELIVERY>
    <G_DELIVERY>
    <ESTABLISHMENT>Name1</ESTABLISHMENT>
    <INVOICE_NUMBER>028993A</INVOICE_NUMBER>
    <INVOICE_DATE>07-01-2012</INVOICE_DATE>
    <INVOICE_SORT>20120107</INVOICE_SORT>
    <INVOICE_PERIOD>Jan-2012</INVOICE_PERIOD>
    <AMOUNT>60.48</AMOUNT>
    <PRODUCT>D16</PRODUCT>
    <PRODUCT_DESC>PAST MILK SEMI CTN</PRODUCT_DESC>
    <ORDER_QTY>288</ORDER_QTY>
    <UNIT_COST>.21</UNIT_COST>
    <LINE_COST>60.48</LINE_COST>
    <LINE_UNIT>1</LINE_UNIT>
    <SERVING>200ML</SERVING>
    </G_DELIVERY>
    <G_DELIVERY>
    <ESTABLISHMENT>Name1</ESTABLISHMENT>
    <INVOICE_NUMBER>028993A</INVOICE_NUMBER>
    <INVOICE_DATE>07-01-2012</INVOICE_DATE>
    <INVOICE_SORT>20120107</INVOICE_SORT>
    <INVOICE_PERIOD>Jan-2012</INVOICE_PERIOD>
    <AMOUNT>61.74</AMOUNT>
    <PRODUCT>D17</PRODUCT>
    <PRODUCT_DESC>PAST MILK WHOLE CTN</PRODUCT_DESC>
    <ORDER_QTY>294</ORDER_QTY>
    <UNIT_COST>.21</UNIT_COST>
    <LINE_COST>61.74</LINE_COST>
    <LINE_UNIT>1</LINE_UNIT>
    <SERVING>200ML</SERVING>
    </G_DELIVERY>
    _______________________Date1_________Date2_______Date3___
    Establishment_______________________________________
    ___________Product______99__99.99___99__99.99____99__99.99__
    <crosstab:c547;"//G_DELIVERY";"ESTABLISHMENT{,o=a,t=t},PRODUCT{,o=a,t=t}";"INVOICE_DATE{INVOICE_SORT,o=a,t=n}";"ORDER_QTY,LINE_COST";"sum"?>
    All I want to do is add a new field after Product - Description.
    I've tried a number of combinations but nothing displays - and now I'm going in circles.
    Something to do with being within <?for-each:.//R2?> ?
    I can change the xml to do what I want but that seems un-necessary!
    Thanks in advance
    Edited by: GaryWW on 25-May-2012 03:29

  • How to move excluded items into Measures in OBIEE 11g Pivot Table

    Hi All,
    Need your help. Previously I have about 25 facts in my pivot table as rows. Now I need to add about 10 more. Adding new criteria only put the items into Excluded section. How can I move all these new items at once to the end of the existing facts? What I can do now is moving them one by one, and in the middle of existing facts, then move it again, because I can point my cursor to the end of them directly.
    Thanks a lot,
    Gajah.

    I've tried to drag the fact heading, but I can't point my cursor to the end of existing list of facts (unfortunately they are all in the same fact group name). Do you have any suggestion on how to put the new facts at the end of the list?
    Thanks.

  • Request in Pivot Table - HELP

    Hi,
    I have created a request in Pivot Table. Rows section Include Product Domain column and Columns Section Includes Month ;
    measures section contains columns gross, profit, loss and YTD %. I want YTD% column to appear after Dec month and it is should come only once.
    In my request it is getting repeated for every month.
    It should look like following way,
    -------------------------------|-------Jan-----|------Feb------|-------Mar------|-------Apr------|--------YTD %
    =========|======|========|========|=========|=========|-------------------
    -------------------|-Gross
    Prod Dom 1-----|-Profit
    -------------------|-Loss

    you can include month to measures and other column row level and apply aggregation
    Edited by: Chack on 20 May, 2010 12:06 PM

  • Error in displaying pivot table

    Hi everyone,
    I have't seen any thread that gives me an answer to my problem.
    I have OBI SE 10.1.3.4 on Windows Server 2003.
    In physical layer i've table REQUEST:
    Pack varchar,
    Seg varchar,
    State varchar,
    SUM_ACT double,
    SUM_PRE double.
    I mapped REQUEST into two tables in Business Model and Mapping:
    DIM_REQUEST:
    Pack varchar PK,
    Seg varchar PK,
    State varchar PK
    FAC_REQUEST:
    Pack varchar FK,
    Seg varchar FK,
    State varchar FK,
    SUM ACT double, -- Sum()
    SUM PRE double, -- Sum()
    PERC double
    PERC is a new logical column: +((SUM ACT)/(SUM PRE))*100+
    Then I mapped FAC_REQUEST into the Presentation layer.
    In Answers I create pivot table with:
         Rows:
         Pack
         Seg
         Measure Labels
         Columns:
         State
         Measures:
         SUM ACT double
         SUM PRE double
         PERC
    Everything is fine, but when I try to add to the pivot table SUM: Columns->Sum (After or Before), I got the following error:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    +State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] Błąd ogólny. [nQSError: 46036] Asercja+
    wewnętrzna: Warunek rightAtomicTableSet.insert(*tableIter).second, plik .\Src\SQONPathJoinComposer.cpp, linia 671.
    +(HY000)+
    SQL Issued: SELECT Zlecenia.Pack saw_0, Zlecenia.Seg saw_1, Zlecenia.State saw_2, Zlecenia."SUM ACT" saw_3,
    Zlecenia."SUM PRE" saw_4, Zlecenia.PERC saw_5, AGGREGATE(saw_5 BY ), AGGREGATE(saw_5 BY saw_2), AGGREGATE(saw_5 BY saw_0, saw_1) FROM TEST ORDER BY saw_0, saw_1, saw_2
    Any idea?

    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=noclassdeffounderrorIWDAbstractTableColumn&adv=false&sortby=cm_rnd_rankvalue
    java.lang.NoClassDefFoundError
    Error while binding node attribute to a  UI  element (table)
    Problem with NWDS 7
    class def error?

  • OBIEE: Pivot table chart is not proper when GOURL is on Measure Column

    Hi All,
    I a facing an issue with Pivot table chart drill.
    Pivot Table columns:
    Row description column in row section.
    Column description (Periods) in column section and
    A Number format amount column in Measure Section (In BMM it is not defined as a measure column).
    GOURL written on the Measure column to enable the drill in Pivot table data.
    When I click on chart the pivoted reasults Graph: Vertical Bar, Type: Default, Style: Rectangle.
    It shows the row description in X axis but the amount is not shown properly (it just shows 1,2,3..numbers on Y axis instead of the amounts which are in lakhs) on Y axis and alos there is not vertical bars showing up.
    Any help in this regard is very helpfull.
    Regards,
    Sagar Vishwanathwar.

    hi Karthikeyan,
    use combined with similar request(union report)
    In first criteria show all the columns
    Second criteria 'Grand total' , year ,month, avg _formula that u have
    Thanks,
    Saichand.v

  • How to make a layer from the ADF pivot table invisible , show-hide column-row-data

    Hello all ,
    I need to create a pivottable with ADF 12c for reporting purposes.
    I have a table or view with 10 items of type VARCHAR2 , C1,C2,C3,C4,C5,C6,C7,C8,C9,C10  and   10 items of type NUMBER N1,N2,N3,N4,N5,N6,N7,N8,N9,N10
    The items of type VARCHAR2 are for Column and Row areas and the items NUMBER are for Data Areas
    I want to create a jsf page with one empty pivottable and in code Show or Hide the items in the Column area , Row area , Data area
    Con you send me a small sample ?
    I test with this code that i find in oracle OTN but not work.
    <dvt:pivotTable id="pt2" value="#{bindings.WebPivotDataView1.pivotTableModel}" var="cellData"
    varStatus="cellStatus" splitMode="enabled"
    binding="#{backingBeanScope.CmfPivotBean.pivotTable}"
    >
    <dvt:headerCell>
    <af:switcher facetName="#{cellData.layerName}" defaultFacet="Default" id="s1">
    <f:facet name="DataLayer">
    <af:outputText value="#{cellData.label}" id="ot1"/>
    </f:facet>
    <f:facet name="C01">
    <af:outputText value="#{cellData.dataValue}" id="ot2"/>
    </f:facet>
    <f:facet name="Default">
    <af:outputText value="#{cellData.dataValue}" id="ot3"/>
    </f:facet>
    </af:switcher>
    </dvt:headerCell>
    <dvt:dataCell>
    <af:switcher facetName="#{cellStatus.members.DataLayer.value}" defaultFacet="Default" id="s2">
    <f:facet name="N01">
    <af:outputText value="#{cellData.dataValue}" id="ot4">
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.WebPivotDataView1.hints.N01.format}"/>
    </af:outputText>
    </f:facet>
    <f:facet name="Default">
    <af:outputText value="#{cellData.dataValue}" id="ot5"/>
    </f:facet>
    </af:switcher>
    </dvt:dataCell>
    </dvt:pivotTable>
    DCBindingContainer bindingContainer = (DCBindingContainer)ADFContext.getCurrent().getRequestScope().get("bindings");
    CubicBinding cubicBinding = (CubicBinding)bindingContainer.findCtrlBinding("WebPivotDataView1");
    CubicEditor cubicEditor = cubicBinding.getCubicEditor();
    cubicEditor.removeLayer(DataDirector.ROW_EDGE, 0); //remove 1st row edge
    cubicEditor.removeLayer(DataDirector.COLUMN_EDGE, 0); // remove 1st column edge
    cubicEditor.removeDataItem(0);
    CubicDefinition def;
    def = cubicBinding.getProjection();
    LayerDefinition layerDefinition = new LayerDefinition("C3");
    cubicEditor.addLayer(DataDirector.ROW_EDGE, 0, layerDefinition);    
    LayerDefinition layerDefinition2 = new LayerDefinition("C4");
    cubicEditor.addLayer(DataDirector.COLUMN_EDGE, 0, layerDefinition2);
    DataItemDefinition def3 = new DataItemDefinition("N1");
    cubicEditor.addDataItem(def3);
    AdfFacesContext.getCurrentInstance().addPartialTarget(pivotTable);
    Can you help me if is possible to create a pivottable binding to a one ViewObject and in code show/hide or compose the layout of the pivottable ??
    I search in google and OTN oracle and not find any code.
    Only find the code of the samples that is very complex for me , the code of the samples create the PivotTableModel from one Array , and i want to binding from one ADB BC ViewObject.
    Thanks in advance

    The solution I presented for your use case an DOAG 2013 was to create a pivot table binding out of user defined attributes from the table. For the defined attributes a VO is dynamically created as well as the pivot binding. The pivot binding is then exchanged at runtime together with the activation of the dynamic VO needed to only get the data needed for the particularly pivot table.
    Your solution using the CubicEditor is hard to implement due to the missing documentation. This was the reason I did not follow this approach, However it's not impossible (done it on a very small scale).
    None of the solution are what I call simple. They are complicated, complex and in part not supported solution (exchanging the pivot table binding at runtime need to use internal classes, which is not supported).
    I can't give you a working sample as it's too complex. I can make the slides available, however they are in German.
    Timo

  • Measures as Rows in Pivot Table? OBIEE 11g

    Hi,
    Is it possible to show measures as rows and attributes as columns? I have only one value in my attribute columns.
    example:
    --------Company(Oracle)-----Country(India)
    Sales        100                  20000
    Units         50                  40000Thanks in advance.

    869650 wrote:
    Hi,
    Is it possible to show measures as rows and attributes as columns? I have only one value in my attribute columns.
    example:
    --------Company(Oracle)-----Country(India)
    Sales        100                  20000
    Units         50                  40000Thanks in advance.In the pivot table, you have a column for Rows, Columns, and Measures.
    Try this:
    Put the Measure Labels in the Rows section, the Company column in the Columns section, and your Measures in the Measures section.

  • Disabling auto sort of rows for Pivot Tables in BI Publisher

    is there a way to avoid the Pivot table in BI Publisher from sorting your data and just display the rows in the order retured from the data model ? By default it is sorting the data in asc order. Thanks !

    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 Restrict the Rows In Pivot Table

    Hi All,
    how to Restrict the Row in the Pivot table.
    My Requirement is like this.
    i have to show the top 10 values in the pivot table but My report is show all the values.
    how can we achieve this.
    any quick solution for this appreciated.
    Thanks,
    Yogi.

    Yogi1729 wrote:
    Hi All,
    how to Restrict the Row in the Pivot table.
    My Requirement is like this.
    i have to show the top 10 values in the pivot table but My report is show all the values.
    how can we achieve this.
    any quick solution for this appreciated.
    Thanks,
    Yogi.You can't really restrict the rows in a pivot table, but you can do this:
    http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/

  • How to convert row data into columns without using pivot table?

    Hello guys
    I have a report that has several columns about sales call type and call counts
    It looks like this:
    Calls Type Call Counts
    Missed 200
    Handled 3000000
    Rejected 40000
    Dropped 50000
    Now I wanna create a report that look like this:
    Missed call counts Handled Call counts Rejected Counts Drop counts Other Columns
    200 300000000 40000 50000 Data
    So that I can perform other calculations on the difference and comparison of handled calls counts vs other call counts..
    I know pivot table view can make the report look like in such way, but they cant do further calculations on that..
    So I need to create new solid columns that capture call counts based on call types..
    How would I be able to do that on Answers? I don't have access to the RPD, so is it possible to do it sololy on answers? Or should I just ask ETL support on this?
    Any pointers will be deeply appreciated!
    Thank you

    Thanks MMA
    I followed your guidance and I was able to create a few new columns of call missed count, call handled counts and call abandoned counts.. Then I create new columns of ave missed counts, ave handled counts and so forth..
    Then I went to the pivot view, I realized there is a small problem.. Basically the report still includes the column "call types" which has 3 different types of call "miss, abandon and handled". When I exclude this column in my report, the rest of the measures will return wrong values. When I include this column in the report, it shows duplicate values by 3 rows. It looks like this:
    Queue name Call types Call handled Call missed Call abondoned
    A Miss 8 10 15
    A Handled 8 10 15
    A Abandoned 8 10 15
    in pivot table view, if I move call type to column area, the resulted measures will become 8X3, 10X3 and 15X3
    So is there a way to eliminate duplicate rows or let the system know not to mulitply by 3?
    Or is this as far as presentation service can go in terms of this? Or should I advice to provide better data from the back end?
    Please let me know, thanks

  • Hide rows in Pivot table Calculated Items in OBIEE 11g

    Hi All,
    I have requirement to show values in Pivot table such that values are divided into two sub totals and also shown in Grand Total.
    For Sub Total 1, all the rows can be shown with Sub total value. But for Sub Total 2, only Total value is to be shown but not all the rows. How this requirement can be done?
    I tried to hide the rows in Sub total 2, but its effecting entire table so those rows are removing from Sub total 1 aswell which should not happen.
    Have look in below table for more clarity. My output should be as shown in Table 2 not as in Table 1.
    Table 1:
    Q1
    Q2
    Q3
    Q4
    Geography
    Type
    Asia
    T1
    100
    200
    300
    400
    America
    T2
    110
    210
    310
    410
    Europe
    T1
    120
    220
    320
    420
    SubTotal1
    330
    630
    930
    1230
    Asia
    T1
    10
    20
    30
    40
    America
    T2
    15
    25
    35
    45
    Europe
    T1
    20
    30
    40
    50
    SubTotal2
    45
    75
    105
    135
    Grand Total
    375
    705
    1035
    1365
    Table 2:
    Q1
    Q2
    Q3
    Q4
    Geography
    Type
    Asia
    T1
    100
    200
    300
    400
    America
    T2
    110
    210
    310
    410
    Europe
    T1
    120
    220
    320
    420
    SubTotal1
    330
    630
    930
    1230
    SubTotal2
    45
    75
    105
    135
    Grand Total
    375
    705
    1035
    1365
    Any ideas how this can be done??
    Thanks for your time.

    Hi,
    Thanks for the reply.
    Here Subtotal will sums up the rows basing on other column (Dimension).
    SubTotal 1 sums the rows basing on the another dimension( value A and value B). SubTotal 2 sums the rows basing on aother values(values C and values C.
    I understand the above solution, but that is not enough to my requirement as I need to show Regions for Subtotal 1, but not for Subtotal 2. And these Subtotals are based on another column (other than Regions).
    Hope this is clear now.

Maybe you are looking for

  • HT201272 How can I re-download purchased tones in itunes?

    I've been having some issues with my phone so as suggested elsewhere I did a complete reset without restoring from a backup, just setup as a new phone.  The other issue are resolved, but now I can't seem to get any of the previously purchased Tones b

  • Print & Scan differences Snow Leopard vs. Lion?

    I have an HP Officejet Pro 8500 (A910a) AiO Printer/Scanner.  It is connected to my network and accessible to many of our home devices including an iMac, a MacBook Pro, iPads and iPhones (via AirPrint).  For the purposes of this topic, I'll refer to

  • Service PO close which is not delivered

    Service PO close which is not delivered, I want to close Service po made wrongly in this current year. it is not closing.

  • Problem with camera on z1

    i have a problem with the camera it doesn't launch from the shutter key directly the camera either gives me a "camera not available" error when i unlock the phone or i have to unlock the phone to launch the camera what to do??????

  • I just got my first Mac and downloaded Photoshop CC onto it. problem

    I just got my first Mac and downloaded Photoshop CC onto it.  I opened my first photo and tried to save.  I get a message that says  " write access in not granted "  what does that mean?  and why can't I save my images?