AGO function error in Pivot Table

Hi,
I have a typical time dimension - year, period, week, date. Most of my facts are available at the most detailed level of date however I have some Budget facts that are only available at the week level. When I combine these facts in a report I am having the below problem.
I use an ago function at the yearweek level ( I needed this so that I can compare week numbers as oppposed to week date ranges which is how the year ago function works - I believe).
If I have a total on year in my pivot table I get the below error -
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22036] Level in AGO function (YearWeek) must be a rollup of (or equivalent to) the measure level (Year). (HY000)
Has anyone come across this before ?
Thanks
Patricia

I am getting the following error message, not sure how to get rid of this.
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22036] Level in AGO function (Fiscal Period) must be a rollup of (or equivalent to) the measure level (Fiscal Year). (HY000)
SQL Issued: SELECT "GL Calendar"."Fiscal Period" saw_0, "Project Manager"."Project Manager Name" saw_1, Project."Project Number" saw_2, Project."Business Area" saw_3, Project."Business Unit" saw_4, Project."Delivery Ownership" saw_5, Project.Programme saw_6, "Fact - Project Cost".Cost saw_7, "Ago Measures"."MAGO Cost" saw_8, "Fact - Project Cost".Cost-"Ago Measures"."MAGO Cost" saw_9, REPORT_SUM(saw_7 BY ), REPORT_SUM(saw_8 BY ), AGGREGATE(saw_9 BY ) FROM "Project - Cost" WHERE ("GL Calendar"."Fiscal Year" = '2011') ORDER BY saw_0, saw_1, saw_2, saw_3, saw_4, saw_5, saw_6

Similar Messages

  • TODATE and AGO function errors in OBIEE

    I have aggregated time dimension. The time calendar comprises of the following structure with a physical table for each level in the Physical Layer -
    Year -> Half Year -> Quarter -> Month -> Week -> Day
    These tables form the calendar. The RPD works fine until I use the TODATE and AGO based fields in the query.
    When I use the AGO and the TODATE time series function to generate the YTD and PY YTD calculations in the Business Modelling Layer. The system gives the following error on Answers -
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22045] AGO function is used on a time dimension which is logically snowflaked. (HY000)
    SQL Issued: SELECT "- Retail Calendar"."Year Identifier" saw_0, "- Sales"."Gallons Sold" saw_1, "- Sales"."Profit Amount" saw_2, "- Sales"."Sales Quantity" saw_3, "- Sales"."Retail Sales Amount" saw_4, "- Sales"."Licensee Sales Amount" saw_5, "- Sales"."% Retail Sales Amount" saw_6, "- Sales"."% Licensee Sales Amount" saw_7, "- Sales"."Store Average Profit" saw_8, "- Sales"."Sales Amount - Last Year" saw_9 FROM "Reporting Objects" ORDER BY saw_0
    Let me know what I am doing incorrect here?
    I have checked all the joins to see if the time calendar has been incorrectly joined, but I can't find anything. Please help.

    Below are the physical tables involved -
    Year - TIME_YEAR_DM
    Half Year - TIME_HALF_DM
    Quarter - TIME_QTR_DM
    Month - TIME_MTH_DM
    Week - TIME_WK_DM
    Day - TIME_DAY_DM
    Each of these tables has an Identifier key (for example, YR_IDNT, HALF_IDNT, QTR_IDNT, etc.) that uniquely identifies the rows. I am using these IDNT fields as my hierarchical keys.

  • Ago function Error

    Hi
    I'm trying to use the 'AGO' function to have The sales of one year ago
    My time dimension is a normal table imported from the database and has one hierarchy:
    Year Level
    --Week Level
    I defined the week date as a chronological key and made a the new calculated column:
    AGO(salesMeasure, DWH_TIME_DIM.WEEKS, 12)
    Then In Aswer I get This Error
    *[NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 22040] To use AGO function, the storage level of the query ('[DWH_TIME_D.Dimension Key]') must be a static level. (HY000)*
    Any one knows why???
    Regards

    Naresh
    I don't see any *(use existing columns as source)* In the creation window of the repository variable I only have a default Initializer.
    What I manged to do also is to write this formula in the default initializer : ADD_MONTHS("orcl".."DWH"."DWH_TIME_D"."YEARIW_TIMEDATE" ,-12)and after to use it in a new calculated column with your expression :
    case when times.year=valueof(previousyear) then salescolumn end
    But I had a syntax error I think I can't use Add_months for this.
    Regards

  • Error with Pivot Table in 10.3.6 weblogic server

    Hi Everyone,
    I created an ADF application and in that i have a Pivot Table i developed using Jdeveloper 11.1.1.3 it was working fine when we deployed the application in Weblogic server 10.3.3.
    Now DBA's upgraded the Weblogic server to 10.3.6 so i downloaded Jdeveloper 11.1.1.6 and generated the EAR file and deployed in the new 10.3.6 server. The pivot table is not working i am getting the following error message
    Root cause of ServletException.
    java.lang.NoSuchMethodError: oracle.adfinternal.view.faces.bi.renderkit.imageView.ImageViewRendererUtils.isAttachmentMode()Z
    at oracle.adfinternal.view.faces.bi.renderkit.pivotTable.RichPivotTableRenderer.getRowBlockSize(RichPivotTableRenderer.java:1489)
    at oracle.adfinternal.view.faces.bi.renderkit.pivotTable.RichPivotTableRenderer.getPivotTableEncodeContext(RichPivotTableRenderer.java:1616)
    at oracle.adfinternal.view.faces.bi.renderkit.pivotTable.RichPivotTableRenderer.encodeAll(RichPivotTableRenderer.java:1789)
    Here is the code
    <dvt:pivotTable id="employeeDocuments_pt"
                            value="#{bindings.lum_EmployeeDocumentsReportView1.pivotTableModel}"
                            binding="#{backingBeanScope.backing_LUM_EMPLOYEE_DOCUMENTS_REPORT.employeeDocuments_pt}"
                            var="cellData" varStatus="cellStatus" sizing="auto" summary="Enrollments"
                            inlineStyle="width:1400px; height:900.0px;"
                            rowFetchSize="-1" columnFetchSize="75">
                <dvt:dataCell dataAttribute="DocumentFlag">
                <af:selectBooleanCheckbox id="idselectbooleancheckbox" label="SELECT" value="#{cellData.dataValue}"
                  readOnly="true"/>
                </dvt:dataCell>              
                </dvt:pivotTable>
    The code remains the same nothing changed from 10.3.3 to 10.3.6 and i even tried deploying the ear file generated from jdeveloper 11.1.1.3 even that did not work.
    Is this soemthing related to libraries issue?
    Can some one help me on this.
    Thanks,
    Harika.

    Timo,
    This the total code for Pivot table and to export that to Excel i think something in the below code is not supported in 11.1.1.6 and later versions. Can i use <dvt:exportPivotTableData> in commandButton ? because when i comment this code it is working fine.
    <af:commandButton text="EXPORT TO EXCEL" immediate="true"
                                binding="#{backingBeanScope.backing_LUM_EMPLOYEE_DOCUMENTS_REPORT.export_btn}"
                                id="export_btn" visible="false"
                                inlineStyle="font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: small;">
            <dvt:exportPivotTableData type="excelHTML" exportedId="employeeDocuments_pt"
               filename="Department_TrainingDocuments_Report.xls" title="PivotTable export"/>
                                </af:commandButton>
    <dvt:pivotTable id="employeeDocuments_pt"
                            value="#{bindings.lum_EmployeeDocumentsReportView1.pivotTableModel}"
                            binding="#{backingBeanScope.backing_LUM_EMPLOYEE_DOCUMENTS_REPORT.employeeDocuments_pt}"
                            var="cellData" varStatus="cellStatus" sizing="auto" summary="Enrollments"
                            inlineStyle="width:1400px; height:900.0px;"
                            rowFetchSize="-1" columnFetchSize="75">
                <dvt:dataCell dataAttribute="DocumentFlag">
                <af:selectBooleanCheckbox id="idselectbooleancheckbox" label="SELECT" value="#{cellData.dataValue}"
                  readOnly="true"/>
                </dvt:dataCell>              
                </dvt:pivotTable>
    Thanks,
    Harika.

  • Error in Pivot table

    Hi,
    I created a report having three pivot tables. Its working fine except for one where i have more records than other two. I have 3 dimension columns and one measure. I want a grand total and sub total on 2 dimensions. Maximum number of records in my report is 134. I want column values to be repeated instead of suppress. Out of this 3 dimension columns two are coming from same table and i want subtotal on this two.Grand total and sub total for higher level dimension column is working fine but when i click sub total for 2nd dimension then its showing following error can you guys help me to sort this out.
    Assertion failure: rTotalPosition.tCellInfo.iLayerCell != rTotalPosition.tCellInfo.iEndLayerCell at line 307 of /net/sdcb80a022/vol1/users/anabuild/views/nightly/Tue/aruba/AIX/vobs/071217.1900/analytics_web/main/project/webpivotview/edgeiteratordef.h
    Thanks,
    Phani.

    MaxVisibleSections

  • OBIEE 11.1.1.7-Ago Function Error-[nQSError: 46008] Internal error: File server\Query\Optimizer\SmartScheduler\PhysicalRequestGenerator\Src\SQOSPMarkMultiTargetSupport.cpp

    Hi All,
    I was performing the steps mentioned in Oracle Tutorial"http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/bi/bi11115/biadmin11g_02/biadmin11g.htm#t10"-BI RPD creation.
    After Using the AGO function data in the Time series metric(Month Ago Revenue) was null always. I updated the DB features in RPD physical layers by selecting support for time series functions.
    After that report started to fail with below error. Please let me know if its a bug and any option to fix it.
    Thanks,
    Sreekanth
    Error
    View Display Error
    Odbc driver returned an error (SQLExecDirectW). 
      Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P 
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46008] Internal error: File server\Query\Optimizer\SmartScheduler\PhysicalRequestGenerator\Src\SQOSPMarkMultiTargetSupport.cpp, line 1680. (HY000) 
    SQL Issued: SELECT 0 s_0, "Sample Sales"."Time"."Year-L1" s_1, "Sample Sales"."Revenue"."Ago-Year Revenue" s_2, "Sample Sales"."Revenue"."Revenue" s_3 FROM "Sample Sales" FETCH FIRST 65001 ROWS ONLY
      Refresh

    I know that there is no relation between "SampleApp Lite"."D3 Orders (Facts Attributes)"."Order Date", "SampleApp Lite"."D0 Time"."Calendar Date", it's also the same thing in my own RPD.
    But as it's working with the 11.1.1.6.2 BP1 version I don't understand why it's not working with 11.1.1.6.9.
    Implicit fact column is not set on my repository, but I don't have any request with only dimensional column, so if my understanding is correct I don't need to use it. Also, the problem appears during the check of the repository not in answers.
    thanks anyway

  • Formatting error on pivot table in migrate report

    Hi to everyone.
    I've this problem:
    I'm migrate a report from OBIEE publisher created on test environment to production environment.
    The version of OBIEE publisher is the same on test and production (11.1.1.6), i' don't know which patch is installed in the 2 environment.
    My problem is on a pivot table in a report, the Header measure column ha 75px Height, in test environment  the full Height have the back color i've choose (Gray) while in production environment the same report with the same specs have the Header Measure column is half in GRAY (my back color choose) and half in blue (standard color of background).
    If i create a new Pivot table with the same style in production ambient and in test i've the same problem.
    Can someone help me for this problem?
    Regards,
    Fabio.

    Timo,
    This the total code for Pivot table and to export that to Excel i think something in the below code is not supported in 11.1.1.6 and later versions. Can i use <dvt:exportPivotTableData> in commandButton ? because when i comment this code it is working fine.
    <af:commandButton text="EXPORT TO EXCEL" immediate="true"
                                binding="#{backingBeanScope.backing_LUM_EMPLOYEE_DOCUMENTS_REPORT.export_btn}"
                                id="export_btn" visible="false"
                                inlineStyle="font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: small;">
            <dvt:exportPivotTableData type="excelHTML" exportedId="employeeDocuments_pt"
               filename="Department_TrainingDocuments_Report.xls" title="PivotTable export"/>
                                </af:commandButton>
    <dvt:pivotTable id="employeeDocuments_pt"
                            value="#{bindings.lum_EmployeeDocumentsReportView1.pivotTableModel}"
                            binding="#{backingBeanScope.backing_LUM_EMPLOYEE_DOCUMENTS_REPORT.employeeDocuments_pt}"
                            var="cellData" varStatus="cellStatus" sizing="auto" summary="Enrollments"
                            inlineStyle="width:1400px; height:900.0px;"
                            rowFetchSize="-1" columnFetchSize="75">
                <dvt:dataCell dataAttribute="DocumentFlag">
                <af:selectBooleanCheckbox id="idselectbooleancheckbox" label="SELECT" value="#{cellData.dataValue}"
                  readOnly="true"/>
                </dvt:dataCell>              
                </dvt:pivotTable>
    Thanks,
    Harika.

  • Rounding the aggregate function in a pivot table

    How do I round the avg(GRADE) when I tried just wrapping it around the avg function I get an error message saying expect aggregate function inside pivot operation
    pivot
    ( avg(GRADE)
    for Column
    in ('1012222','2221112','333113' );
    Thanks for the help.
    Edit : Sorry wasn't very clear all thats shown is the pivot part of the statement.
    Edited by: 836321 on Feb 13, 2011 8:56 AM
    Edited by: 836321 on Feb 13, 2011 8:58 AM

    Hi, and welcome to the forum.
    It is hard to see how your piece of pseudo SQL is related to your subject title.
    There should not be any problem in wrapping ROUND around AVG:
    SQL> select deptno, round(avg(sal)) from emp
    where deptno in (10,20)
    group by deptno
        DEPTNO ROUND(AVG(SAL))
            20            2175
            10            2917
    2 rows selected.Edit: Sorry, did not recognize you query bit. You probably are asking about this:
    SELECT * FROM
       (SELECT deptno, sal FROM emp)
        PIVOT
       (ROUND(AVG(sal)) FOR deptno IN (10 AS Accounting, 30 AS Sales));
    Error at line 4
    ORA-56902: expect aggregate function inside pivot operationSuppose you have to (There might be other ways)
    SQL> SELECT Round(accounting), round(sales) FROM
       (SELECT deptno, sal FROM emp)
        PIVOT
       (AVG(sal) FOR deptno IN (10 AS Accounting, 30 AS Sales));
    ROUND(ACCOUNTING) ROUND(SALES)
                 2917         1567
    1 row selected.Regards
    Peter
    Edited by: Peter on Feb 13, 2011 9:05 AM
    Edited by: Peter Gjelstrup on Feb 13, 2011 9:08 AM

  • Using Slicer to change row dimension in pivot table

    I have a requirement to display a measure amount by Quarter,Month or Week of Year.  The user needs to select one of three slicer buttons, Quarter, Month or Week.  I have tried creating a calculated column in my tables, e.g PeriodToDisplay using
    "If" or "Switch".  
    PeriodToDisplay:=Switch (Dates[PeriodSelected],"Quarterly",FactTableName[Qtr],"Monthly",FactTableName[Month],"Weekly",FactTableName[weeknum])
    Where Dates[PeriodSelected] is just a 3 row table with , Quarterly,Monthly,Weekly rows.  I display those as a slicer in the powerpivot view.
    The FactTableNames are where the aggregation sql have been done.  The row labels now are:
    Qtr
    Month
    Week
    And the granularity i know can be collapsed by the user but they do not want to see a Qtr displayed when they only want to see the month.
     I receive an error message the Quarter is not in the proper context or is a circular reference.

    The behavior you want can be achieved with a hierarchy built in the Power Pivot model, and then using Excel's drill down functionality on the pivot table.
    Alternately, you could define an MDX named set for the pivot table to define the rowfilters.

  • Mimic "show data as percent of row parent" in non-pivot table

    Is it possible to implement or mimic the 'percentage of parent row' functionality, foreseen for pivot tables in obiee 11g, for a 'normal' table?
    We use a rather fixed table, in which no drilling is allowed - conditions are applied by means of prompts and filters. The report is based upon the store dimension, which has as hierarchy: country > cluster > store. We have added a column to represent the 'share' of a store's net turnover in the cluster total. The results looks like:
    country  cluster  store  turnover   share
    =======  =======  =====  ========   =====
    belgium  1        a        20.000   66.7%
                      b        10.000   33.3%
             cluster total:    30.000  100.0%
             2        c        40.000   57.1%
                      d        30.000   42.9%
             cluster total:    70.000  100.0%
    country total:            100.000  100.0%
    holland  3        e        50.000   71.4%
             4        f        20.000   28.6%
             cluster total:    70.000  100.0%
    country total:             70.000  100.0%
    grand total:              170.000  100.0%Instead of all the total levels showing as 100% however, we would like to see each sub-total represented as a percentage of the level above, much like the forementioned pivot table functionality. For the example above that would mean it should look like:
    country  cluster  store  turnover   share
    =======  =======  =====  ========   =====
    belgium  1        a        20.000   66.7%
                      b        10.000   33.3%
             cluster total:    30.000   30.0%
             2        c        40.000   57.1%
                      d        30.000   42.9%
             cluster total:    70.000   70.0%
    country total:            100.000   58.8%
    holland  3        e        50.000   71.4%
             4        f        20.000   28.6%
             cluster total:    70.000  100.0%
    country total:             70.000   41.2%
    grand total:              170.000  100.0%Any advice or idea would be greatly appreciated...

    902360 wrote:
    Hello,
    I'd like to know if there's a way to configure the Pivot Table "Show Data As - Percent of" precision.
    ATM, I have some reports using SR types where one of those are much bigger than the others.. So when the report its generated, it returns something like:
    TYPE A: 99%
    TYPE B: 0%
    TYPE C: 0%
    TYPE D: 0%
    How can I show the other types correct value? Something like number of decimal places...
    Ps: As criteria to this report, I have changed my Data Format to "Number", "Minus: -123" with 15 Decimal Places.
    Thanks,
    RamonYup. Can do. Read this link:
    http://shivabizint.wordpress.com/2008/09/14/changing-the-precession-of-percent-of-columns-in-pivot-table-of-obiee/

  • Pivot Table generation using ABAP code

    Hi Friends,
                  Could you please anyone help me to get the functionality of generating Pivot table in Excel from SAP.
    and let me know how to use the structure EXCELPIVOT.
    I am very greatful if anyone get me for this.

    Hi ,
             Here is the code.
    -->  p1        text
    <--  p2        text
    FORM fill_xxl_interface .
      xmpl_header1 = text-048.
      PERFORM fill_xmplt_o.
      PERFORM fill_xmplt_p.
      PERFORM fill_xmplt_v.                " online text
      PERFORM fill_xmplt_s.
      PERFORM fill_xmplt_h.
      PERFORM xxl_list_output.
    ENDFORM.                    " fill_xxl_interface
    *&      Form  fill_xmplt_o
          text
    -->  p1        text
    <--  p2        text
    FORM fill_xmplt_o .
      DATA:
          info1(40),
          info2(40),
          ival1(60),
          ival2(60).
      info1(40) = text-049.
      info2(40) = text-050.
      WRITE sy-datum TO ival1.
      WRITE sy-uname TO ival2.
      xmplt_o-line_no    = 1.              " Text which can be displayed
      xmplt_o-info_name  = info1.          " \ online in the list viewer
      xmplt_o-info_value = ival1.          " \ is defined here.
      APPEND xmplt_o.                                           "#EC *
      xmplt_o-line_no    = 2.
      xmplt_o-info_name  = info2.
      xmplt_o-info_value = ival2.
      APPEND xmplt_o.                                           "#EC *
    ENDFORM.                    " fill_xmplt_o
    *&      Form  fill_xmplt_p
          text
    -->  p1        text
    <--  p2        text
    FORM fill_xmplt_p .
      DATA:
        ptxt1(60),
        ptxt2(60),
        ptxt3(60).
      ptxt1(20) = text-051.                " SAP R/3   XXL Listviewer
      ptxt2(20) = text-052.                " Programmplanung
      WRITE sy-datum TO ptxt3.
      xmplt_p-hf         = 'H'.                                 "
      xmplt_p-lcr        = 'L'.            " left position
      xmplt_p-line_no    = 1.                                   "
      xmplt_p-text       = ptxt1.
      APPEND xmplt_p.                                           "#EC *
      xmplt_p-lcr        = 'C'.
      xmplt_p-line_no    = 2.
      xmplt_p-text       = ptxt2.
      APPEND xmplt_p.                                           "#EC *
      xmplt_p-lcr        = 'R'.
      xmplt_p-line_no    = 1.
      xmplt_p-text       = ptxt3.
      APPEND xmplt_p.                                           "#EC *
    ENDFORM.                    " fill_xmplt_p
    *&      Form  fill_xmplt_v
          text
    -->  p1        text
    <--  p2        text
    FORM fill_xmplt_v .
      vtxt1 = text-004.                    " Production Line
      REPLACE ';;' WITH ' ' INTO vtxt1.
      vtxt2 = text-007.                    " Year
      REPLACE ';;' WITH ' ' INTO vtxt2.
      vtxt3 = text-024.                    " Month
      REPLACE ';;' WITH ' ' INTO vtxt3.
      vtxt4 = text-026.                    " Material
      REPLACE ';;' WITH ' ' INTO vtxt4.
      vtxt5 = text-022.                    " Material Description
      REPLACE ';;' WITH ' ' INTO vtxt5.
      vtxt6 = text-028.                    " Dosage Form
      REPLACE ';;' WITH ' ' INTO vtxt6.
      vtxt7 = text-047.                    " Dosage
      REPLACE ';;' WITH ' ' INTO vtxt7.
      vtxt8 = text-009.                    " Units per Pack
      REPLACE ';;' WITH ' ' INTO vtxt8.
      vtxt9 = text-036.                    " Manufacturing Stage
      REPLACE ';;' WITH ' ' INTO vtxt9.
      vtxt12 = text-092.                   " Order Number
      REPLACE ';;' WITH ' ' INTO vtxt12.
      vtxt13 = text-093.                   " Start Date
      REPLACE ';;' WITH ' ' INTO vtxt13.
      xmplt_v-col_no     = 1.
      xmplt_v-col_name   = vtxt1.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 2.
      xmplt_v-col_name   = vtxt2.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 3.
      xmplt_v-col_name   = vtxt3.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 4.
      xmplt_v-col_name   = vtxt4.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 5.
      xmplt_v-col_name   = vtxt5.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 6.
      xmplt_v-col_name   = vtxt6.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 7.
      xmplt_v-col_name   = vtxt7.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 8.
      xmplt_v-col_name   = vtxt8.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 9.
      xmplt_v-col_name   = vtxt9.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 10.
      xmplt_v-col_name   = vtxt12.
      APPEND xmplt_v.                                           "#EC *
      xmplt_v-col_no     = 11.
      xmplt_v-col_name   = vtxt13.
      APPEND xmplt_v.                                           "#EC *
    ENDFORM.                    " fill_xmplt_v
    *&      Form  fill_xmplt_s
          text
    -->  p1        text
    <--  p2        text
    FORM fill_xmplt_s .
      DATA: n      TYPE i,                                      "#EC NEEDED
            col_no TYPE i.                                      "#EC NEEDED
      CLEAR: xmplt_s, n.
      DO n_vrt_keys TIMES.
        ADD 1 TO col_no.
        PERFORM line_xmplt_s USING col_no 'STR' 'DFT'.
      ENDDO.
      DO 6 TIMES.
        ADD 1 TO col_no.
        PERFORM line_xmplt_s USING col_no 'NUM' 'ADD'.          "CO 589334
      ENDDO.
    ENDFORM.                    " fill_xmplt_s
    *&      Form  LINE_XMPLT_S
          text
         -->P_COL_NO  text
         -->P_1708   text
         -->P_1709   text
    FORM line_xmplt_s  USING     col_no
                                col_typ
                                col_ops.
      xmplt_s-col_no     = col_no.
      xmplt_s-col_typ    = col_typ.
      xmplt_s-col_ops    = col_ops.
      APPEND xmplt_s.                                           "#EC *
    ENDFORM.                    " LINE_XMPLT_S
    *&      Form  fill_xmplt_h
          text
    -->  p1        text
    <--  p2        text
    FORM fill_xmplt_h .
      PERFORM line_xmplt_h USING 1 1 text-012.
      PERFORM line_xmplt_h USING 1 2 text-014.
      PERFORM line_xmplt_h USING 1 3 text-016.
      PERFORM line_xmplt_h USING 1 4 text-019.
      PERFORM line_xmplt_h USING 1 5 text-030.
      PERFORM line_xmplt_h USING 1 6 text-033.
    ENDFORM.                    " fill_xmplt_h
    *&      Form  line_xmplt_h
          text
         -->P_1      text
         -->P_1      text
         -->P_TEXT_012  text
    FORM line_xmplt_h  USING     row_no col_no text.
      xmplt_h-row_no     = row_no.
      xmplt_h-col_no     = col_no.
      xmplt_h-col_name   = text.
      APPEND xmplt_h.                                           "#EC *
    ENDFORM.                    " line_xmplt_h
    *&      Form  xxl_list_output
          text
    -->  p1        text
    <--  p2        text
    FORM xxl_list_output .
      DATA slines TYPE i.
      DESCRIBE TABLE xmplt_s LINES slines.
      n_att_cols = slines - n_vrt_keys.
      SORT t_final BY year month dispo.
      CALL FUNCTION 'XXL_FULL_API'                              "#EC *
        EXPORTING
          filename          = 'XXLPB001'
          header_1          = xmpl_header1
          no_dialog         = space
          n_att_cols        = n_att_cols
          n_hrz_keys        = 6
          n_vrt_keys        = n_vrt_keys
          sema_type         = ' '
        TABLES
          data              = t_final
          hkey              = xmplt_h
          online_text       = xmplt_o
          print_text        = xmplt_p
          sema              = xmplt_s
          vkey              = xmplt_v
        EXCEPTIONS
          cancelled_by_user = 1
          data_too_big      = 2
          dim_mismatch_data = 3
          dim_mismatch_sema = 4
          dim_mismatch_vkey = 5
          error_in_hkey     = 6
          error_in_sema     = 7
          file_open_error   = 8
          file_write_error  = 9
          inv_data_range    = 10
          inv_winsys        = 11
          inv_xxl           = 12
          OTHERS            = 13.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " xxl_list_output
      Data declarations for 'XXL_FULL_API'                               *
    DATA: xmpl_header1 TYPE gxxlt_p-text.
    DATA BEGIN OF xmplt_o OCCURS 0."#EC *     " Internal tables which shall be
            INCLUDE STRUCTURE gxxlt_o."#EC *   " \ used as input into the function
    DATA END OF xmplt_o.                   " \ module's table parameters,
    " \ are defined with reference to
    DATA BEGIN OF xmplt_p OCCURS 0."#EC *    " \ the appropriate DD structures.
            INCLUDE STRUCTURE gxxlt_p.                          "#EC *
    DATA END OF xmplt_p.
    DATA BEGIN OF xmplt_h OCCURS 0.                             "#EC *
            INCLUDE STRUCTURE gxxlt_h.                          "#EC *
    DATA END OF xmplt_h.
    DATA BEGIN OF xmplt_v OCCURS 0.                             "#EC *
            INCLUDE STRUCTURE gxxlt_v.                          "#EC *
    DATA END OF xmplt_v.
    DATA BEGIN OF xmplt_s OCCURS 0.                             "#EC *
            INCLUDE STRUCTURE gxxlt_s.                          "#EC *
    DATA END OF xmplt_s.
    DATA: n_att_cols TYPE i,
          n_vrt_keys TYPE i VALUE '11'.

  • Access Pivot Table truncates sums

    I use Pivot Tables in Access 2007 a lot and discovered recently when trying to tie out the results that when the raw data has decimal values, as in a currency format, the sum function in the pivot table is truncating the results to a whole interger. 
    Not rounding, but truncating, so this is an issue with accuracy.  The results are displaying in a currency format, but anything to the right of the decimal is a zero.  How can I get the pivot table sums to be accurate to two decimal points? 

    SUM("Sales Measures".Dollars By Markets.Region )) it will return sum of dollars by region wise
    or
    try new calculated item
    $1 + $2 +$3 likewise it will sum all the n columns u r having
    Edited by: Kishore P on Jun 22, 2010 7:16 PM

  • Use of LinRegSlope in Pivot Table

    Hi, I am new to OLAP and am having a hard time using the LinRegSlope function on a pivot table. I have a pivot table which pulls data from a server and has "store names" (rows) and "dates" (columns) as the dimensions. i.e.
    [State].[City].[Store] and [year].[month].[date]. The measure being displayed is Revenue.
    I would like to calculate the slope of the "Revenues", such that I could tell whether the revenue on a specifc store is going up or down through a deternimed period of time - only the period being displayed on the table (e.g. 10/10/2014
    through 10/25/2014). I want the slope to appear as a column within the pivot table, and I want it to adjust to the number of stores and dates being displayed at the time (i.e. in the example above the slope should be calculated over a 16 day period because
    there are 16 dates being displayed).
    Any help on the syntax of the function would be greatly appreciated.
    -Jose

    Hi Josemp,
    According to your description, you want to calculate the sales slope from 10/10/2014 to 10/25/2014. Right?
    In Analysis Services, we can use LinRegSlope() function, specify Sales as Y axis value, Date as X axis value. Please refer to the query below:
    WITH
          MEMBER Measures.[Slope] AS
           LINREGSLOPE(LASTPERIODS(16) AS
          [TimeSet],[Measures].[Internet Sales Amount] , RANK([Date].[Fiscal].CurrentMember, [TimeSet]))
    SELECT
          {[Measures].[Slope]} ON COLUMNS,
           {[Date].[Date].&[20051010]:[Date].[Date].&[20051025]}ON ROWS
    FROM
          [Adventure Works]
    If you have any question, please feel free to ask.
    Simon Hou
    TechNet Community Support

  • What is differenence b/w table & pivot table?

    hai........
    what is differenence b/w table & pivot table?

    1. In Pivot table View you can view the data in cross tab fashion where as in Table View you can not....
    (CrossTab means you can create a report where you can see (for example) Sales Values with Region in rows section and Year in Columns Section)
    ------------Year----------------Year-------------Year
    ------------2001---------------2002-------------2003
    East------ 200--------------500-----------------100
    West-----300---------------600----------------5000
    South----100---------------4000--------------30002. In TableView you can use the WriteBack functionality but in Pivot Table view you can not.....
    3. In Pivot table you must have at least one measure in the measures section other wise it won't display the results, But in table view there is no such a constraint....
    HTH

  • Using Axis(1), gives error "Slicer Axis cannot be referenced" in excel pivot table, but works fine ssms

    Hi .. I am using Axis(1) to select all the retrieved records. The MDX query looks like-
    WITH MEMBER [Measures].[New Opportunity Count]
     AS SUM(
             {DESCENDANTS(
              [Opportunity].[Opportunity].CURRENTMEMBER,
              1
            iif([Measures].[Opportunity Sales Days - Invisible] > 0,1,0)
     //HAVING [Measures].[New Opportunity Count] = 1
     MEMBER [Measures].[Latest Opportunity Count]
     AS SUM(
          EXCEPT( AXIS(1),
                    [Opportunity].[Opportunity].[All]
                 ),[Measures].[New Opportunity Count])
    MEMBER [Measures].[Opportunity Sales Days]
    AS iif([Measures].[New Opportunity Count] =0,0,
          iif([Opportunity].[Opportunity].CURRENTMEMBER.MEMBER_KEY =[Opportunity].[Opportunity].[All].MEMBER_KEY,
            (SUM(
                EXCEPT(AXIS(1),
                    [Opportunity].[Opportunity].[All]
                 ),[Measures].[Opportunity Sales Days - Invisible])/[Measures].[Latest Opportunity Count]),
            [Measures].[Opportunity Sales Days - Invisible]/[Measures].[New Opportunity Count])
    SELECT 
      [Measures].[Latest Opportunity Count],
      [Measures].[New Opportunity Count],
      [Measures].[Opportunity Sales Days]
    }ON COLUMNS,
        [Opportunity].[Opportunity].&[{140D9883-6F49-E011-AEA0-00155D032A00}],
        [Opportunity].[Opportunity].&[{3A2BB124-EE85-E011-8A06-00155D032A00}],
        [Opportunity].[Opportunity].&[{60036FE8-DC48-E111-975F-00155D032A00}],
        [Opportunity].[Opportunity].&[{CA158EE5-C445-E111-975F-00155D032A00}],
        [Opportunity].[Opportunity].&[{B69F83EB-832D-E211-9861-00155D032A00}],
        [Opportunity].[Opportunity].&[{D500AE90-606C-E211-83AD-00155D03570D}],
        [Opportunity].[Opportunity].[All]
    //      [Opportunity].[Opportunity].members
    ON ROWS
    FROM [IMGROUP Base]
    It works fine in SSMS editor, but while trying to access the same query from Excel pivot table, it gives the error : "Slicer axis cannot be referenced". I have taken the MDX query from excel and it looks like -
    SELECT NON EMPTY Hierarchize({DrilldownLevel({[Opportunity].[Opportunity Hierarchy].[All]},,,INCLUDE_CALC_MEMBERS)}) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME,[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Account Manager],[Opportunity].[Opportunity
    Hierarchy].[Opportunity].[Opportunity Actual Close Date Time],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Age In Days],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Close Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Created On Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Created On Date Time],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Days In Sales Stage],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Delivery
    Owner],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Close Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project Duration In Days],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Estimated Project Duration In Months],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project Duration In Working Days],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project End Date],[Opportunity].[Opportunity
    Hierarchy].[Opportunity].[Opportunity Estimated Project First Working Day Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project Last Working Day Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated
    Project Start Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Latest News],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Latest News Updated On Date Time],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Lost Competitor],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Originating Lead Name],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Owning Organisation],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Revenue Spread],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Sales Assist],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Sales Assist-Hidden],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Sales Stage],[Opportunity].[Opportunity
    Hierarchy].[Opportunity].[Opportunity Sales Stage Updated On Date Time],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Source Full Name],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity State],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Sub Source],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Updated On Date Time],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Won Lost Description],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Won Lost
    Reason] ON COLUMNS  FROM (SELECT ({[Opportunity].[Opportunity Hierarchy].[Opportunity].&[{B69F83EB-832D-E211-9861-00155D032A00}], [Opportunity].[Opportunity Hierarchy].[Opportunity].&[{CA158EE5-C445-E111-975F-00155D032A00}], [Opportunity].[Opportunity
    Hierarchy].[Opportunity].&[{60036FE8-DC48-E111-975F-00155D032A00}], [Opportunity].[Opportunity Hierarchy].[Opportunity].&[{3A2BB124-EE85-E011-8A06-00155D032A00}], [Opportunity].[Opportunity Hierarchy].[Opportunity].&[{140D9883-6F49-E011-AEA0-00155D032A00}]})
    ON COLUMNS  FROM [IMGROUP Base]) WHERE ([Measures].[Opportunity Sales Days]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
    Any help, will be greatly apreciated.
    Sayan.

    Sorry, it was a mistake in my query. Now I have corrected each of them and individually each of them works fine. See below-
    CREATE MEMBER CURRENTCUBE.[Measures].[New Opportunity Count]
     AS SUM(
             {DESCENDANTS(
              [Opportunity].[Opportunity].CURRENTMEMBER,
              1
            iif([Measures].[Opportunity Sales Days - Invisible] > 0,1,0)
    VISIBLE = 0 , 
    ASSOCIATED_MEASURE_GROUP = 'Opportunity';  
    CREATE MEMBER CURRENTCUBE.[Measures].[Latest Opportunity Count]
     AS SUM(
          EXCEPT(Axis(0),
                   [Opportunity].[Opportunity Hierarchy].[All]
                 ),[Measures].[New Opportunity Count]), 
    VISIBLE = 0 , 
    ASSOCIATED_MEASURE_GROUP = 'Opportunity';  
    CREATE MEMBER CURRENTCUBE.[Measures].[Opportunity Sales Days]
    AS iif([Measures].[New Opportunity Count] =0,0,
          iif([Opportunity].[Opportunity].CURRENTMEMBER.MEMBER_KEY =[Opportunity].[Opportunity].[All].MEMBER_KEY,
            (SUM(
                EXCEPT(AXIS(0),
                  [Opportunity].[Opportunity Hierarchy].[All]
                 ),[Measures].[Opportunity Sales Days - Invisible])/[Measures].[Latest Opportunity Count]),
            [Measures].[Opportunity Sales Days - Invisible]/[Measures].[New Opportunity Count])
    VISIBLE = 1,  
    DISPLAY_FOLDER = 'Days',  
    ASSOCIATED_MEASURE_GROUP = 'Opportunity';  
    CREATE MEMBER CURRENTCUBE.[Measures].[Opportunity Actual Value Home Currency New]
     AS  SUM(
             {DESCENDANTS(
              [Opportunity].[Opportunity].CURRENTMEMBER,
              1
            iif([Measures].[Opportunity Sales Days] > 0,[Measures].[Opportunity Actual Value Home Currency],0)
    VISIBLE = 0,  
    ASSOCIATED_MEASURE_GROUP = 'Opportunity'  ; 
    CREATE MEMBER CURRENTCUBE.[Measures].[Opportunity Actual Revenue Per Sales Day]
    AS iif([Measures].[Opportunity Actual Value Home Currency New] =0,0,
          iif([Opportunity].[Opportunity Hierarchy].CURRENTMEMBER.MEMBER_KEY =[Opportunity].[Opportunity Hierarchy].[All].MEMBER_KEY,
            (SUM(
              EXCEPT( AXIS(0),
                    [Opportunity].[Opportunity Hierarchy].[All]
                 ),[Measures].[Opportunity Actual Value Home Currency New])/[Measures].[Opportunity Sales Days]),
            ([Measures].[Opportunity Actual Value Home Currency New]/[Measures].[Opportunity Sales Days]))
    FORMAT_STRING = "£#,##0.00;-£#,##0.00;#",
    VISIBLE = 1,
    DISPLAY_FOLDER = 'Financial',
    ASSOCIATED_MEASURE_GROUP = 'Opportunity';  
    But, when I want to select them together from Excel, I am geeing the below error-
    CellOrdinal 0
    VALUE #Error MdxScript(IMGROUP Base) (1436, 7) Members, tuples or sets must use the same hierarchies in the EXCEPT function.
    FORMAT_STRING £#,##0.00;-£#,##0.00;#
    LANGUAGE (null)
    BACK_COLOR (null)
    FORE_COLOR (null)
    FONT_FLAGS (null)
    The generated MDX in Excel as -
    SELECT {[Measures].[Opportunity Actual Revenue Per Sales Day],[Measures].[Opportunity Sales Days]} DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON COLUMNS , NON EMPTY Hierarchize({DrilldownLevel({[Opportunity].[Opportunity Hierarchy].[All]},,,INCLUDE_CALC_MEMBERS)})
    DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME,[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Account Manager],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Actual Close Date Time],[Opportunity].[Opportunity
    Hierarchy].[Opportunity].[Opportunity Age In Days],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Close Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Created On Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Created On Date Time],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Days In Sales Stage],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Delivery Owner],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated
    Close Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project Duration In Days],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project Duration In Months],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Estimated Project Duration In Working Days],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project End Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project First Working Day Date],[Opportunity].[Opportunity
    Hierarchy].[Opportunity].[Opportunity Estimated Project Last Working Day Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Estimated Project Start Date],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Latest News],[Opportunity].[Opportunity
    Hierarchy].[Opportunity].[Opportunity Latest News Updated On Date Time],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Lost Competitor],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Originating Lead Name],[Opportunity].[Opportunity
    Hierarchy].[Opportunity].[Opportunity Owning Organisation],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Revenue Spread],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Sales Assist],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Sales Assist-Hidden],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Sales Stage],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Sales Stage Updated On Date Time],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity
    Source Full Name],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity State],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Sub Source],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Updated On Date Time],[Opportunity].[Opportunity
    Hierarchy].[Opportunity].[Opportunity Won Lost Description],[Opportunity].[Opportunity Hierarchy].[Opportunity].[Opportunity Won Lost Reason] ON ROWS  FROM (SELECT ({[Opportunity].[Opportunity Hierarchy].[Opportunity].&[{B69F83EB-832D-E211-9861-00155D032A00}],
    [Opportunity].[Opportunity Hierarchy].[Opportunity].&[{60036FE8-DC48-E111-975F-00155D032A00}], [Opportunity].[Opportunity Hierarchy].[Opportunity].&[{3A2BB124-EE85-E011-8A06-00155D032A00}], [Opportunity].[Opportunity Hierarchy].[Opportunity].&[{E2E48CB7-8463-E411-831D-00155D035708}],
    [Opportunity].[Opportunity Hierarchy].[Opportunity].&[{140D9883-6F49-E011-AEA0-00155D032A00}]}) ON COLUMNS  FROM [IMGROUP]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS
    Any help?
    sayan maity

Maybe you are looking for

  • How to read row index when clicking on F4 search multiple rows

    Hi Experts, I would like to read index of selected row in assignation block. Please help. My requirement is to restrict product search base on product category available in same row of table row. When I select f4 search on product ID, It shows me all

  • XML element in image URL

    Hi All, I used this to get dynamic URL resolution for logo on my report. Simple url:{'http://localhost/logo.jpg'} works just fine for HTML output. But once I use XML element for URL resolution it does nothing... url:{concat('http://',FILE_PATH)} retu

  • Error ORA-00604 AND ORA-00036

    How to resolve ora error ORA-00604 and ORA-00036. I am getting this error in alert.log: ORA-00604: ERROR OCCURED AT RECURSIVE SQL LEVEL 51 ORA-00036: MAXIMUM NUMBER OF RECURSIVE SQL LEVELS (50) EXCEEDED.

  • NullPointerException when exporting for iOS

    I have an AIR for iOS project that runs fine in the simulator, but when I try to export a release build and click on 'finish', then it starts compiling and after a minute or two, i get a Exception in thread "main" java.lang.NullPointerException at ad

  • V$parameter view - How do I get these values for both instances on the db?

    I have a procedure that dumps the contents of all the parameters from the system view v$parameter for auditing purposes, so that we know if a parameter changed from month to month, but we have 2 instances running. How do I make sure and log the param