Average & SUM in a Single criteria in the Pivot View

Hi,
Can you plese let me know whether it is possible to have SUM at the Grand Total level & Average on the Right Hand side of the Pivot Table view at the same time.
Thanks & Regards
Siva.

Hi,
The way you want to do it is not possible.
What you can do is make a union of 2 reports one is using the Sum and the other the AVG and not use the Grand total provided by OBIEE.It's kind of creating your own Grand Totals
Look at this thread it will help:
http://obiee101.blogspot.com/2010/08/obiee-combine-with-similar-request.html
If you are using pivot table you can think about a new calculate item as a GT
http://varanasisaichand.blogspot.com/2010/12/aggregate-functions-on-grand-total.html
Best regards
Adil
PS: Please don't forget to close the thread and assign points when your question is answered
Edited by: adil.harrab on Jun 6, 2011 1:36 PM

Similar Messages

  • How to download the pivot view to the excel sheet with all features

    Hi,
    Using discoverer, my co-worker is able to download the pivot view to excel sheet with all enabled features, like pivot table in excel.
    Is this can be done in obiee? if this feature is present in obiee, plz will you explain me how to do in obiee? its urgent.
    Thanks,

    Hi abc,
    I don't think BI office plug-in supports you the pivot table features of MS Excel.
    Even if you import a pivot table from BI, it is rather treated just as a table in Excel
    Regards,
    Raghu

  • Is there a way I can view the classic reader for the whole of Thunderbird without me having to change it for every single mail, 'cos the other view is confusing

    All views other than the classic view are unnecessarily complicated, confusing and - to me - irritating. The view of each individual mail can of course be changed which is tiresome. Is there a way to have Thunderbird - who is otherwise a very good mailing software - in classic view for all my e-mails. By way of one general button that allows classic view throughout.
    Thank you very much.
    Jacquot Verborgh

    eer... did you install the conversations add-on by any chance? Thunderbird has not changed the way it views mails ever I don't think, so I am looking for another cause in your case.

  • Exclude the value 0 records in the pivot view obiee 10g

    HI,
    I have a requirement.,i have report circuit and outage time by month in a pivot view.If one circuit have a '0' outage time in all months then i want to exclude the record from the display.Is there anyway to display the data like this....
    thanks,
    prassu

    circuit   April may jun
       1          0   0     10   
       2         0     0     0
       3         0     4    1
    my question is  for circuit 2 all months we have outage 0.so i want to exclude the record , if we select Quarter 2.
    And  exclude 3 if we  select April....etc

  • How can I see my book in portrait as a single page of the landscape view??

    I created my book in landscape mode and when i realized that in portrait mode i could see only a text flow with the widgets on the left i whas very worried!
    Do you think i can realize a portrait view of my landscape view single paged???
    Thank you so much!!!

    I'm using a template that i have modified and i've saved it as a new template!
    Maybe i've found to modify the PDF vectorials with Illustrator but very long and sad...

  • How can I use a single query panel with two view criteria?

    Hi all,
    I have a requirement to allow users to change the "display mode" on a search results tree table for an advanced search page. What this will do is change the structure of how the data is laid out. In one case the tree table is 3 levels deep, in the other case it's only 2 with different data being at the root node.
    What I've done so far:
    1) I exposed the data relationship for these two ways of viewing the data in the application module's data model.
    2)  I created a view criteria in the two view objects that are at the root of the relationships, where (for simplicity sake) I'm only comparing a single field.
    This is in one view object:
    <ViewCriteria
        Name="PartsVOCriteria"
        ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.PartsVO"
        Conjunction="AND">
        <Properties>... </Properties>
        <ViewCriteriaRow
          Name="vcrow23"
          UpperColumns="1">
          <ViewCriteriaItem
            Name="PartDiscrepantItemsWithIRVO"
            ViewAttribute="PartDiscrepantItemsWithIRVO"
            Operator="EXISTS"
            Conjunction="AND"
            IsNestedCriteria="true"
            Required="Optional">
            <ViewCriteria
              Name="PartDiscrepantItemsWithIRVONestedCriteria"
              ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.PartDiscrepantItemsWithIRVO"
              Conjunction="AND">
              <ViewCriteriaRow
                Name="vcrow26"
                UpperColumns="1">
                <ViewCriteriaItem
                  Name="InspectionRecordNumber"
                  ViewAttribute="InspectionRecordNumber"
                  Operator="="
                  Conjunction="AND"
                  Value=""
                  Required="Optional"/>
              </ViewCriteriaRow>
            </ViewCriteria>
          </ViewCriteriaItem>
        </ViewCriteriaRow>
      </ViewCriteria>
    and this is in the other view object:
    <ViewCriteria
          Name="IRSearchCriteria"
          ViewObjectName="gov.nasa.jpl.ocio.qars.model.views.InspectionRecordVO"
          Conjunction="AND">
          <Properties>... </Properties>
          <ViewCriteriaRow
             Name="vcrow7"
             UpperColumns="1">
             <ViewCriteriaItem
                Name="InspectionRecordNumber"
                ViewAttribute="InspectionRecordNumber"
                Operator="="
                Conjunction="AND"
                Required="Optional"/>
          </ViewCriteriaRow>
       </ViewCriteria>
    3) I had a query panel and tree table auto-generated by dragging the data control for ONE of the view object data relationship that's exposed in the app module. Then I created a second query panel and tree table the same way but using the data control for the other. I'm hiding one of the query panels permanently and toggling the visibility of the tree tables based on the display mode the user chooses. Both tables have separate bindings and iterators.
    This is a portion of the page definition:
    <executables>
        <variableIterator id="variables"/>
        <searchRegion Criteria="IRSearchCriteria"
                      Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"
                      Binds="InspectionRecordVOIterator"
                      id="IRSearchCriteriaQuery"/>
        <iterator Binds="InspectionRecordVO" RangeSize="25"
                  DataControl="QARS_AppModuleDataControl"
                  id="InspectionRecordVOIterator" ChangeEventPolicy="ppr"/>
        <iterator Binds="Root.QARS_AppModule.PartsVO1"
                  DataControl="QarsMasterAppModuleDataControl" RangeSize="25"
                  id="PartsVO1Iterator"/>
        <searchRegion Criteria="PartsVOCriteria"
                      Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"
                      Binds="PartsVO1Iterator" id="PartsVOCriteriaQuery"/>
      </executables>
    4) I've created a custom queryListener to delegate the query event.
    This is in my advanced search jsp page:
    <af:query id="qryId1" headerText="Search" disclosed="true"
                      value="#{bindings.IRSearchCriteriaQuery.queryDescriptor}"
                      model="#{bindings.IRSearchCriteriaQuery.queryModel}"
                      queryListener="#{pageFlowScope.SearchBean.doSearch}"
                      queryOperationListener="#{bindings.IRSearchCriteriaQuery.processQueryOperation}"
                      resultComponentId="::resId2" maxColumns="1"
                      displayMode="compact" type="stretch"/>
    This is in my backing bean:
    public void doSearch(QueryEvent queryEvent) {
          String bindingName = flag
             ? "#{bindings.IRSearchCriteriaQuery.processQuery}"
             : "#{bindings.PartsVOCriteriaQuery.processQuery}";
          invokeMethodExpression(bindingName, queryEvent);
       private void invokeMethodExpression(String expr, QueryEvent queryEvent) {
          FacesContext fctx = FacesContext.getCurrentInstance();
          ELContext elContext = fctx.getELContext();
          ExpressionFactory eFactory = fctx.getApplication().getExpressionFactory();
          MethodExpression mexpr =
             eFactory.createMethodExpression(elContext, expr, Object.class, new Class[] { QueryEvent.class });
          mexpr.invoke(elContext, new Object[] { queryEvent });
    When no inspection record number (the only search field so far)  is supplied in the query panel, then it behaves correctly. Namely, the tree tables shows all search results. However, when an inspection record number is supplied the tree table that was created with the query panel in use (remember there are two query panels, one of them is hidden) shows a single result (this is correct) while the other tree table (the one with the hidden query panel that isn't in use) shows all results (this is NOT correct).
    Is what I'm trying to accomplish even doable? If so, what am I missing?
    I'm using JDeveloper 11.1.1.7
    Thanks,
    Bill

    I ended up keeping one query panel permanently visible and the other permanently hidden. When performing a search using the table that has the hidden query panel, I seed the query descriptor for the hidden query panel using the visible query panel's query descriptor and then delegate the request:
       public void doSearch(QueryEvent queryEvent) {
          String bindingName = null;
          if(isIrTableRendered()) {
             bindingName = "#{bindings.IRSearchCriteriaQuery.processQuery}";
          } else {
             seedPartsQueryDescriptor();
             bindingName = "#{bindings.PartsVOCriteriaQuery.processQuery}";
             queryEvent = new QueryEvent(partsQuery, partsQuery.getValue());
          invokeMethodExpression(bindingName, queryEvent);
       private void seedPartsQueryDescriptor() {
          ConjunctionCriterion criterion = irQuery.getValue().getConjunctionCriterion(); 
          for(Criterion criteria : criterion.getCriterionList()) {
             AttributeCriterion attributeCriteria = (AttributeCriterion)criteria;
             List values = attributeCriteria.getValues();
             String qualifiedName = attributeCriteria.getAttribute().getName();
             int indexOfDot = qualifiedName.lastIndexOf(".");
             String name = indexOfDot < 0
                ? qualifiedName
                : qualifiedName.substring(indexOfDot + 1);
             ConjunctionCriterion partsCriterion =
                partsQuery.getValue().getConjunctionCriterion();
             for (Criterion partsCriteria : partsCriterion.getCriterionList()) {
                AttributeCriterion partsAttributeCriteria =
                   (AttributeCriterion) partsCriteria;
                String partsQualifiedName =
                   partsAttributeCriteria.getAttribute().getName();
                if (partsQualifiedName.endsWith(name)) {
                   partsAttributeCriteria.setOperator(attributeCriteria.getOperator());
                   List partsValues = partsAttributeCriteria.getValues();
                   partsValues.clear();
                   for (int i = 0, count = values.size(); i < count; i++) {
                      partsValues.set(i, values.get(i));
       private void invokeMethodExpression(String expr, QueryEvent queryEvent) {
          FacesContext facesContext = FacesContext.getCurrentInstance();
          ELContext elContext = facesContext.getELContext();
          ExpressionFactory expressionFactory =
             facesContext.getApplication().getExpressionFactory();
          MethodExpression methodExpression =
             expressionFactory.createMethodExpression(elContext, expr, Object.class, new Class[] { QueryEvent.class });
          methodExpression.invoke(elContext, new Object[] { queryEvent });
    Then when the advanced/basic button is pressed for the visible query panel, I programmatically set the same mode for the hidden query panel:
       public void handleQueryModeChange(QueryOperationEvent queryOperationEvent) {
          if(queryOperationEvent.getOperation() == QueryOperationEvent.Operation.MODE_CHANGE) {
             QueryMode queryMode = (QueryMode) irQuery.getValue().getUIHints().get(QueryDescriptor.UIHINT_MODE);
             QueryDescriptor queryDescriptor = partsQuery.getValue();
             queryDescriptor.changeMode(queryMode);
             AdfFacesContext.getCurrentInstance().addPartialTarget(partsQuery);

  • How to apply common View criteria for all LOV View programatically?

    Hi,
    In my application I use nearly 100 VOs, which will be mapped as LOV to some base VOs. These VOs are not only for LOV but also will be used directly in screen as read-only table. All these VOs contains EFF_BGN_DTand EFF_END_DT. Requirement is to display only the active records in VO.
    We don't want to crete view criteria at design time for each and every VO. Instead we want to have a base ViewObjectImpl class, create at runtime and add this common criteria with the existing view criterias (If any given, which are actually required for the developer for screen specific functionality).
    NOTE: As all of our VOs are custom java data source implemented and none of them have queries, we cannot use whereclause API but only ViewCriteria.
    We want to create a view criteria, that somewhat looks like the below condition.
               (     (TO_CHAR( EffBgnDt, 'yyyy-mm-dd') <= '2010-02-01' )
                 AND (TO_CHAR( EffEndDt, 'yyyy-mm-dd') >= '2010-02-01' )
                 OR
               (     (TO_CHAR( EffBgnDt, 'yyyy-mm-dd') <= '2010-02-01' )
                 AND (EffEndDt IS NULL )
               )Question:
    1. Which is the best place in ViewObject class, where I will be able to create common view criteria, include it with existing criterias.
    Thanks in Advance.
    Raghu

    No it is not working. I've tested. When i test your implementation in my sample using AM tester, it is not at all going inside getCriteriaItemClause(ViewCriteriaItem pViewCriteriaItem). For example when i say, AM.findViewObject(String ViewObjectName), followed by getEstimatedRowCount(), it should apply common filter criteria and give me the result.
    Given below required scenario:
    Department table:
    ID     DEPT_NAME     START_DATE     END_DATE
    1     Hr          1-Jan-2010     
    2     Purchasing     1-Jan-2010     31-Dec-2010
    3     Shipping             1-Jan-2010     31-Dec-2055
    4     Sales          1-Jan-2010     
    Common criteria to be applied (Programatically) : :bind_current_date between StartDate and EndDate or :bind_current_date >= StartDate and EndDate is null
    VO specific view criteria (may vary VO to VO): DeptName not equal to 'Sales'
    Expected Result:
    Case 1:
             a. DeptView = AM.findViewObject("DepartmentVO")
             b. DeptView.getEstimatedRowCount()
              It should give me 3 records (Hr, Shipping, Sales)
    Case 2:
             a. DeptView = AM.findViewObject("DepartmentVO")
             b. Create View Criteria 'NotSalesDeptVC', which should not list out Sales department.
             c. Apply NotSalesDeptVC using RowSet rowSet = (RowSet) this.findByViewCriteria(NotSalesDeptVC, -1, ViewObject.QUERY_MODE_SCAN_VIEW_ROWS)
             d. rowSet.getEstimatedRowCount()
              It is in-memory filtering, will not disturb the default rowset, should give me 2 records (Hr, Shipping)
    Case 3:
             a. DeptView = AM.findViewObject("DepartmentVO")
             b. Apply 'NotSalesDeptVC' to the default row set, followed by executeQuery
             c. DeptView.getEstimatedRowCount()
              It should give me 2 records. (Hr, Shipping)
    Case 4:
             a. DeptView = AM.findViewObject("DepartmentVO")
             b. Unapply the applied 'NotSalesDeptVC', followed by executeQuery
             c. DeptView.getEstimatedRowcount()
              It should give me 3 records (Hr, Shipping, Sales)Essence is at any point of time, User should always work with active records. He no need to write extra logic to retrieve only the active records but the base Viewobject impl should have. Note, All of my view objects are custom java data source implemented and not query based. Similarly it does not meant that all of my VOs will be having some business specific View criteria. Some VOs may have. Some VOs may not have. However basic active records criteria is applicable for all VOs

  • Weighted Average in Pivot View

    Hi,
    Can you please throw some light on the below scenario based on weighted average:
    For Ex:
    Cloumn1---Column2-----Column3
    R1-----------Line Item1--10
    R1-----------Line Item2--20
    R2-----------Line Item3--30
    R2-----------Line Item4--40
    Now i am trying to achieve weighted average based on the group by of Column1.
    10+20=30==>30/2=15
    30+40=70==>70/2=35
    Before raising this thread, i had a look at the below URL:
    http://siebel.ittoolbox.com/groups/technical-functional/siebel-analytics-l/weighted-average-for-fact-column-values-1242947
    Can you please let me know how we can achieve this in the pivot view(OBIEE 10.1.3.4.1).
    Your help is highly appreciated.
    Thanks in Advance
    Siva

    Hi,
    Try-
    AVG(measure_col by column1)
    And try making in the column formula -Aggregation Rule (Totals Row)-->Average
    And also try making the aggregation rule in the pivot table of the column as-->Average
    Hope this helped/ answered.
    Regards
    MuRam
    Edited by: MuRam on Jun 11, 2012 4:46 AM

  • "Pie chart in pivot view  showing only the first column's results" in obiee

    Hi,
    In my pivot view(pie chart view+pivottable),i'm getting only the first column's result in pie chart..
    I have added a column named *'A*' in rows and '*moneyspent*' in measuresfield and the '*period*' in the columnsfield in the pivot view.I'm calculating the sum of
    the rows and columns..
    I'm not getting the sum valueof moneyspent in the pie chart..instead i'm getting only the first column of period in the pivot table in the pie chart.
    can anyone tell how can i get the sum value of pivot table in pie chart?
    Thanks in advance..

    Hi Prash,
    let me try to give you an example based on the paint sample:
    Use Markets.Region, Products.Brand, 'Sales Measures'.Units
    choose a pivot view to display the result: region goes into the rows-section, Brand goes into the columns-section and Units into the measures-section
    In the columns-section add a total using the 'add total' at 'Measure Labels' level
    the result is a total column on the right side of the pivot.
    looking like this:
    Units
    Brands
    Region Enterprise Magicolor Mccloskey Valspar Units Total
    Central 1032.....
    Eastern 1485......
    Southern 824.....
    Western 580
    What I am looking for is a new column 'Units Total pct'.
    If I duplicate the measure to show the values in percent, I'll get a second column per Brand (showing the absolute and percentage values) - that's what I don't want
    Regards
    Andy

  • Can I get multiple sums in a single column based on a "code" I place.

    After importing a file of check/debit card activity from my bank, can I 'code' the line items based on tax categories ie Utilities, Medical expenses, Auto expenses, etc. and then get sums for each based on that code I placed in a single column? That would mean multiple sums in a single column based on the code used for each tax related expense. For instance, I would put UT in the column for utilities expenses and MED in the same column if it were a medical expense. I would then want the sum for all items in that column for each item code. Is this possible or do I need to use a different approach to get this information.

    My guess is that the SUMIF function may be your friend.
    It's well described in the *iWork Formulas and Functions User Guid*e which every user may download from the Help menu.
    Yvan KOENIG (VALLAURIS, France) samedi 2 janvier 2010 21:56:39

  • Merging two records in a single record for the same matnr,werks and bwart.

    Hi I have a requirement to merge two records into one single record using the quantity field from MSEG table.
    I am selecting two records from the table MSEG. Now for these two records i have to add the quantity values into one variable.
    Then there should be only one record for the same matnr,werks,bwart.
    Any suggestion would be appreciated.
    Regards,
    Amit

    hi,
    You can COLLECT statement only if all non key fields are numeric.
    This statement Adds all such fields and give us a single record.
    Regards
    Sumit Agarwal

  • Average sum for a column in ALV tree layout

    Hi,
    I've trying to set an average sum for a column in an ALV tree report.  In the field catalog i set the DO_SUM field to 'X' and this will do a total sum, but I can't find out how in the code to do the average sum.
    Also to get round this I was going to just set a default display variant with the "average" sum option saved after i had manually selected the columns and set it to this.  Problem with this is that when i re-run it, the sum comes back as a total rather than an average.  I have tried setting display variants on the SAP example ALV tree programs and the same thing happens.
    Does anyone know how i can get round this?
    Cheers
    Matt.

    Hi,
    In addition to setting DO_SUM = 'X' you need to specify function in H_FTYPE field. It should be set to 'AVG' in your case.
    ls_fielcat-do_sum = 'X'.
    ls_fieldcat-h_ftype = 'AVG.

  • Display "group name" values and their average formulas (calculation of average age) on a single line or row

    <p>I have four groupings, Domain, Area, Priority (3rd level of grrouoping) and then Problem ID. Priority group could have values such as &#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39; and &#39;5&#39; with corresponding "average" age formula on these group level. values.</p><p>Example:  1         Avg Age= 30</p><p>               2         Avg Age= 45</p><p>               3         Avg Age= 69</p><p>Reguirement:  Display group name values and their corresponding average formula on a single line/row.</p><p>Sample Solution:   Priority 1 = 30, Priority 2 = 45, Priority 3 = 69 </p><p> ***solution above should be displayed/concatenated on one line.</p><p>Your help is greatly appreciated, thank you in advance.</p>

    So right now - your report looks like this
    GroupHeader 1
       GroupHeader 2
           Priority 1 = 50         (actual display of Group 3)
           Priority 2 = 75         (actual display of Group 3)
           Priority 3 = 45         (actual display of Group 3)
           Priority 4 = 9          (actual display of Group 3)
           Priority 5 = 8          (actual display of Group 3)
    And you want to change that so that it displays horizontally.
    If there will only ever be 5 priorities, I think I would cheat the system a bit.  Create a formula that runs at the group 3 level and dumps the values into 5 separate variables (formula below).
    Then create 5 separate display formulas and put them in Group Footer 2 (if you already have a GF2 - then create a second one and move it above your current GF2).  Suppress the G3 section and you should be close to what you are after (unless you also have detail sections, then we'll need to revisit).
    This could also be accomplished with a multi-column subreport at the G2 or G3 level if you need more flexibility.
    formula *******
    numbervar priority1;
    numbervar priority2;
    numbervar priority3;
    numbervar priority4;
    numbervar priority5;
    if {DB.Priority} = 1 then priority1:= {@avgGroupPriorityAvgAge}
    else if {DB.Priority} = 2 then priority2:= {@avgGroupPriorityAvgAge}
    else if {DB.Priority} = 3 then priority3:= {@avgGroupPriorityAvgAge}
    else if {DB.Priority} = 4 then priority4:= {@avgGroupPriorityAvgAge}
    else if {DB.Priority} = 5 then priority5:= {@avgGroupPriorityAvgAge}

  • Average of the Grand Total in the Pivot Table

    all,
    I have calculated a Grand Total of sum 3 days trade in the pivot table using the Totals after in the Pivot table. I wanted to obtain the average of this Grand total. How can i achecive this in OBIEE 10g.? Please help urgent

    I did not understand your scenario exactly. Did you try using the 'newly calculated column' option from 'More options' of the particular column for which you want the average?.
    for example
    segment brand 1 value
    brand 2 value
    brand 3 value
    brand 4 value
    Avg brand per segment <value>
    notice that the 'Avg brand per segment' is a 'newly calculated item' where the average brand has been calculated. hope this helps.

  • Formula for calculating the average takings for a given day in the week?

    I would like to calculate the average takings for each day of the week for a given financial year.

    Rick,
    I've looked at your document, made some additions and returned it to you. In your document you were not only using AVERAGE, but also MIN and MAX. Unfortunately, MIN and MAX don't have "IF" versions, so they can't be used to selectively operate on data matching criteria in a range.
    What I did to accommodate the need for MIN and MAX was to add a column for each criteria, in this case the different days of the week.
    In your document you also indicated the need for a Chart to graphically summarize the performance by day of the week. I rearranged your summary stats table to facilitate creating a chart from that table. I chose the mixed category chart with Bars for Min and Max and a Line for Average.
    Following are Screen Shots for the modified Data table, the Stats table and the Chart:
    The key expressions are:
    For Monday receipts:
    =IF(WEEKDAY($B)=2, $G, "")
    For Monday Minimum:
    =MIN(INDIRECT("Ledger::"&CHAR(70+ROW())))
    You had pre-filled Column A with 3-letter abbreviations of the Days of the Week. I am not sure this is important, since you could have formatted the Date (Column B) to show the same information, but I didn't like seeing the abbreviations for days that didn't have data entered yet so I replaced the text with an expression...
    =IF(LEN(B)>0, LEFT(DAYNAME(WEEKDAY(B)), 3), "")
    I seems that you may have filled the table with several months worth of rows of Mon, Tue, etc. Now, if you wish, you can trim the blank rows to just a few and add more as you need them.
    Let me know if you have any questions about maintaining the document.
    Jerry

Maybe you are looking for