Aggregation of Measures

When we try to map the measures of the cube to the relational tables, the default SQL generated is only with SUM operator, however we have the scenario where wo would need to use AVG.
Pls can you advise is there any way in Oracle OLAP to achieve this?

Do you mean that you want to load the data into the AW using the AVG function instead of SUM? If this is true, are you planning to use AVG as the aggregation operator in the AW as well? Will this give the answer you want? The code currently defaults to SUM for load even if you aggregate the cube using AVG since AVG of AVG is not usually what people want. If you want to do it anyway then there it is possible if you hand edit the XML to add an attribute named AggregationMethod to the CubeMap. E.g.
    <CubeMap
      Name="MAP1"
      Query="SALES_FACT"
      AggregationMethod="AVG">But the simpler way to do it is to define a SQL View that aggregates to the load level using AVG and then map the cube to the view.

Similar Messages

  • Cube operator and aggregation of measures on existing records

    Hi there,
    I'm using a cube operator with loading type LOAD in order to perform merge on fact table.
    We have following situation
    Record already exists on fact table for customer and product with qty 8.
    Incoming record has qty 2, so tried using cube operator hoping that because aggragtion specfied on qty measure was sum and set to solve cube, new qty would be 10.
    However, looked at sql generated and record simply gets updated with new qty rather than adding new to existing qty.
    I can achieve our aim by simply reading for any existing record and adding new record qty to existing record qty, but was hoping the cube operator would do thi s for me.
    Anybody achivede anything similar using sinmply cube operator.
    Many Thanks

    Do you mean that you want to load the data into the AW using the AVG function instead of SUM? If this is true, are you planning to use AVG as the aggregation operator in the AW as well? Will this give the answer you want? The code currently defaults to SUM for load even if you aggregate the cube using AVG since AVG of AVG is not usually what people want. If you want to do it anyway then there it is possible if you hand edit the XML to add an attribute named AggregationMethod to the CubeMap. E.g.
        <CubeMap
          Name="MAP1"
          Query="SALES_FACT"
          AggregationMethod="AVG">But the simpler way to do it is to define a SQL View that aggregates to the load level using AVG and then map the cube to the view.

  • Answers - Columns and aggregation of measures

    Can I bring in data at a line item (Order_ID) level in Answers do some calculations around a metric returned, then be able to hide/remove this column in a table and have the metrics be aggregated up to the other level - say if I bought in Region? I have some bucketing to do around an Order metric but don't want to present this granularity in the table.
    Thanks

    Yvan.
    In the end I settled for aggregating tax year data (for fifteen years) as this seems to be the main reason for being retrospective in my accounting. I had to reference this manually in the ledger.
    I then used formula similar to this in the crosstab:
    =SUMIFS(Register :: $gbpe,Register :: $Field,"=Income",Register :: $Type,"=Salary",Register :: $Tax,$A11) where $A11 refers to the crosstab year row in question.
    I see a problem with the computing load these formulae have created, but am pleased to be able to do the analysis, as I was reliant on pivot tables in Excel and wondered how I could cope in Numbers.
    Thanks for your help

  • Configuring measures with custom aggregation for hierarchies

    Can I Configuring different measures with different aggregation for hierarchies . in AWM the aggregation for measures are disabled, am I missing something.
    For example
    Dimension : supplier
    Measure : risk score
    Aggregation : maximum
    Dimension : supplier
    Measure : spent
    Aggregation : sum

    Yes it is possible. But make sure that you have turned the compression off in the cube

  • Aggregation Questions

    Hi there
    Got a couple of questions about OWB 10g R2 aggregations.
    #1 When I create a cube with aggregations, I cannot for the life of me determine how the aggregations are actually implemented.
    Are they implemented by separate tables? materialised views?
    So far, when I browse the schema, I can't see any extra database objects created for the purpose of providing aggregates.
    #2 I have seen this problem posted by a number of people, but have not yet seen any answer on how to overcome it.
    When I create a cube, for some measures I would like to "SUM", for others I would like to "AVERAGE" and for columns such as degenerate dimensions (i.e. Transaction_ID) I would like to have no aggregation at all.
    Can anyone tell me how to achieve this using the OWB Cube object???

    Hi
    Answer to the second question:
    In Design Center you have to double click in Project Explorer on the cube you want to examine. Than Data Object Editor is launched. To change the aggregation function of certain measures you have to select Aggregation tab in the low right corner. Than in the Measures panel select the measure that you want change aggregation function for. You can now change aggregation for that measure in panel: Aggregation for measure xxx.
    Regards
    Peter

  • ENT- 06955 Cube Name does not exist in schema !!!

    Hi , I decided to implement a small scale warehouse just to get a feel of OWB anyways i retrieved the data from a SQL Server database and populated my staging database i then implemented a cube and called it sales it so happens that upon creating a cube it automatically creates a measures "sales_1" tables in the tables sections. Anyways so i did the mapping and successfully the table got populated. I.e The table contained 2 aggregated (summed) measures with the three dimensions specified in the cube . So i guess the cube table got populated. This is the cube rite ?? I mean the table is the cube rite with both the measures and all the dimensions in one table ?? Furthermore so will each cube have a distinct table ?? What bothers me is when i double click on the cube in OWB i get the error the cube must be deployed... So i deploy the cube and it says successfully deployed. After that when i right click on the cube and select view data a error message comes up saying the workspace does not have a sales database (but it does) ?? Can we actually view the data in a cube through OWB other than viewing the data in the sales_1 table generated by the cube? ?? Could anyone know what i am doing wrong or what may be the problem..
    The error message that i am getting is "Cube name sales does not exist in OLAP schema ACME_DWH. Please deploy the cube SALES on to the olap schema ACME_DWH"

    Hi,
    When you create a dimension or a cube with ROLAP implementation, their "Deployment Option" will be set to "Deploy Data Object only" by default. If you want to browse data in dimension/cube using "Data Viewer", you have to right click the dimension/cube, click "Configurate..." in the popup menu, find "Deployment Option" property in Configuration editor, set it to "Deploy All" or "Deploy to Catalog only", then deploy and run it again.
    However there is another way to check dimension/cube data if you selected "Deploy Data Object only". You can find dimension/cube implement table, right click on that table, then click "Data...".
    Cheers,
    Dawei
    Edited by: dawsun on May 19, 2010 11:53 PM

  • # Multivalue error in cross tab

    Hi All,
    I am using BO-launch pad 4.1,sp2 Data is from Bex-query using CMC.
    Table: Cross tab
    1)Dimenssion obj: CO-object
    2)Attributs: Co-obj-wbs elemt,costcentr,order
    3)Measure:Budjet aproval overall, Budjet for annul,Actual cost, Actual quantity,planned cost, planned quantity
    when drag i dimension co-obj,attributes and all measures it showing values but when i drag attributes and measures (No need to drag dimension) it is showing in crosstab
    # Multivalues error in all measure fields.
    Can you plz give me suggestions on this.
    Thanks
    Ganesh

    Hello,
    Please check if you have used exception aggregation on measures in the BEx queries. These aggregation might be using some dimensions as reference characteristics. And if that dimensions are not included, you might get these multivalue error.
    Good Day !!

  • The 'Keep Flag' property -- How does it work? Why does it work?

    Within my calculation views I had been encountering problems properly aggregating the measures, when certain attributes were excluded from the result set. An SAP consultant recommended setting the attributes' KeepFlag property to True; that resolved the problem, but I'm not sure why.
    The help feature within HANA Studio doesn't mention the Keep Flag property. I haven't been able to find much information about this property online, either.
    Exception aggregation modeling with Graphical Calc view states:"The Keep flag will always add [the specified] columns in the group by clause even if they are not selected in the query." This is a good start; however, is there any additional documentation regarding this property?

    Thanks, Jody. That explanation is helpful. So should Keep Flag be set to True for all of the columns that the user could potentially exclude from the result set? To illustrate: Given the following sample data:
    PRODCODE   LOCATION   QUANTITY
    12345      A                 1
    23456      B                10
    34567      C               100
    12345      A                 1
    If the result set excludes LOCATION, the aggregated results are incorrect; i.e.,
    PRODCODE   QUANTITY
    12345             1
    23456            10
    34567           100
    The second occurence of 12345 / A / 1 is inexplicably excluded. Setting LOCATION's Keep Flag property to True restores the second occurrence--resulting in the correct quantities; i.e.,
    PRODCODE   QUANTITY
    12345             2
    23456            10
    34567           100
    Of course, calculation views typically have many more attribute columns. Should the Keep Flag property be set to True for every one of the columns that the user could potentially exclude from the result set?

  • Logic of queries in OBIEE

    I understand the logic of OBIEE queries as following.
    There is a fact table with measures and there are dimension tables connected to that fact table.
    In a query we want to have some aggregations of measures over several dimension attributes.
    If we have another fact table connected to the same dimensions (as the first fact table) we can also include measures from it in the query.
    But in real life I doubt that architectures of databases are always as simple.
    Actually we can have a fact table with connected dimensions. But there can be another fact table connected only to one or two dimensions.
    A classic example: fact table - "sales", dimension tables - "customers", "salesrooms", "dates", "products". And another fact table "insurances" can be connected to "customers". The table "insurances" contains facts about insurances which customers have (they can purchase different insurances of different types, so one customer can have many insurances, other can have no insurances; they purchase insurances on some date, so the table is updated often - so it cannot be regarded as a dimension).
    And then we want to run a query like (also classic example):
    Customer Name | Product Name | Shop Name | Sum(Sales, $)
    This query is correct and runs perfectly.
    But also we want to include insurance facts in the query:
    Customer Name| Count(Insurance ID) | Product Name | Shop Name | Sum(Sales, $)
    Count(Insurance ID) can be considered as a new virtual attribute of "Customers" dimension (each customer have several insurances - maybe zero).
    But this query will not run, because OBI server wants to consider insurances connected not only to customers, but also to other dimensions which are in the query (products, salesrooms).
    How to build a repository to allow such queries?
    I don't believe that all repositories have only very simple star schemas and all the queries are like the query in the classic example. And I don't believe noone has encountered a problem like this.
    Thanks in advance!

    Thank you very much, it helped, but another problem appeared.
    In queries all customers (and their count(insurances)) are shown despite all the filters on other dimensions.
    For example I can set filter to Product Name = Product1 AND Shop Name = Shop1. Then the result wiil be like this:
    Customer Name| Count(Insurance ID) | Product Name | Shop Name | Sum(Sales, $)
    Cust1 | 3 | Product1 | Shop1 | 1234
    Cust2 | 1 | Product1 | Shop1 | 4321
    Cust3 | 2 | <empty> | <empty> | <empty>
    Cust4 | 1 | <empty> | <empty> | <empty>
    That is, Cust3 and Cust4 didn't by Product1 in Shop1 but they are in the query results.
    How to tackle this problem?
    Thanks in advance!

  • Values becomes #available or #error after formaula

    Hi All,
    I am creating a webi report on SAP universe.
    Problem :
    Whenever I apply any date related formala on the date field , all the values in the measure becomes #error or #available .
    Additional informaion :
    it has got say 6 fields like Cusotmer , sales material and Date ( making it one dimension) and Profit , quanity sold and amount as measures.
    I created a formaula on date field and added 4 days to the current date.
    Now what happens is if I dragged this new formaula object to webi output area all my measures become #error or #un available.
    When i remove this newly created formaula from result area , all the values comes back .
    This happend also when I wanted to find out the name of the day on a particular date and drangged onto my resultant area.
    After this all the measure values in the webi got #error or #available error.
    Any help is highly appreciated.
    Thanks & Regards,
    Anjna Goyal

    Hi,
    The measures you use are probably set to aggregate using "database aggregation"
    (properties tab of the object definition) as this is the default when you generate a universe on SAP BW.
    What that tells BO is that you want the database (in this case BW) to calculate the measure on each datapoint in the report separately. However BW doesn't know about this new dimension object (its not a BW characteristic), so BO states that it cannot give you the value at that datapoint.
    Ask your designer to set the object aggregation of measures to sum (this is the most likely candidate),
    this will allow the aggregation to be done by Webi internally.
    Hope this helps,
    Marianne

  • Can BI Server launch parallel query (with DOP 1)?

    Hi guys,
    I have some perfomance problems with some reports. These reports are quite siple, no aggregation, no measures...just columns coming from different dimensions.
    The problem is that the size of the dimensions ranges from 1 milion to 10 milions of records and some dimensions are linked by "outer join" relationships. The physical query generated by the BI Server takes around 22 minutes but if i modify the same query adding the paralellism for the involved tables (e.g. select /*+ paralell(mytable 4) */ ...) i get the result in 5 minutes (1/4 of the time).
    So is there any way to force the BI server to use a degree (DOP) > 1 for the all/some physical tables?
    What about using indexes (I didn't create any index yet, maybe i should start to use them for primary/foreign keys)?
    Of course, others solutions to fix this issue are appretiated! :-)
    Thanks in advance,
    Nazza

    Nazza,
    Did you try out the HINT feature(Physical Table ->>General Tab -->>HINT) available in physical layer. You can use parallel hint there and the query generated would use the same while firing it to the database.
    Indexex are good to have but do check with your DBA, which index would be more cost effective to your query.
    Cheers
    Dhrubo

  • Proactive Caching - Monitoring processing

    I'd like to hear from anyone that is using proactive caching and how they monitor the loads of the cube. 
    I have created a Aggregation=Max measure in each measure group that loads as getdate(), this allows me to see the load date by partition.  My date dimension has a partition_cd, which denotes what dates a partition covers.  The partition date
    scheme is the same for all measure groups.  This handles things from the user perspective, they know how recent their data is.
    What it doesn't do is allow me to see average load times, number of loads per day, etc..  the things I need from a support perspective.
    The only solution I have seen for this is the ASTrace.exe application.  This would mean installing something custom on the server, like to avoid that if I can.  Any other options out there?
    Any other feedback on this area in general?
    As always you guys are great, thanks for all the help!
    -Ken

    Hi Ken,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Charlie Liao
    TechNet Community Support

  • ETL with OWB and Workspace Manager with Analytic Workspace Manager?

    I already created my dimensions and cubes with "warehouse builder", as a tables, so can I map them in the dimensions and cubes defined with "analytic workspace manager?
    please somone help, becasue I can't found this information on a manual "OLAP application's developers guide".
    also, whichis the manual that I have to follow to create things in AWM? i think is this that I use "OLAP application's developers guide"
    Someone can tell me something?
    Thanks.

    Hi,
    I.m using OWB 10.1.0.4.0 and choosing "Project" then "Metadata Export" and finally "Bridge" I can lanch a wizard that allow me to choose between 3 kind of export.
    If you choose OLAP the wizard will ask you which collection of metadata to export and other options, after succesfully running this wizard (which is not so easy) you can open the AWM and see the export of your dimesion and cube iside an AW.
    I'm finding lots of problems using this feature due to the limited options I can set to the cube and the dimension (type of aggregations, calculated measures, limit on the number of measures in the cube, etc.).
    Waiting for the new OWB Paris if you can post your experience it will be very appreciated.
    Good luck,
    Franco

  • Calculation by rank

    Hi,
    I have a complex report.
    I list the first 5 customers (rank) by the 2nd mesure at the tipology level. Then the total and the total of the other. I calculate the ratio of the measure to measure at the market level(including the tipology I excluded from the report).
    I have to calculate the 3rd measure = 2nd measure * 1000 / 1st measure.
    It doesn't work for the total top5 and total other.
    I used more union to have this report.
    I tryed to calculate this 3rd measure into the report and at the subject area level. I have the hierarchy region->market->typology->customer
    Here is what I'd like to have.
    Do you have any ideas?
    Thank you.
    Region     Market     tipology     aggregation     1st measure     2nd measure     3rd measure
    Reg1     Mark1     T1     C1          1.000,00     100,00          100,00
                        C2          2.000,00     80,00          40,00
                        C3          300,00          57,00          190,00
                        C4          200,00          30,00          150,00
                        C5          200,00          8,00          40,00
                   Total Top5          3.700,00     275,00          74,32
                   % vs market          12,33          7,86          63,71
                   Total Other          7.235,00     500,00          69,11
                   % vs market          24,12          14,29          59,24
                   Total T1          10.935,00     775,00          70,87
                   % vs market          36,45          22,14          60,75
              T2          C1          1.250,00     150,00          120,00
                        C2          2.000,00     80,00          40,00
                        C3          300,00          60,00          200,00
                        C4          400,00          30,00          75,00
                        C5          200,00          10,00          50,00
                   Total Top5          4.150,00     330,00          79,52
                   % vs market          13,83          9,43          68,16
                   Total Other          6.000,00     657,00          109,50
                   % vs market          20,00          18,77          93,86
                   Total T2          10.150,00     987,00          97,24
                   % vs market          33,83          28,20          83,35
                   Total MARK1          30.000,00     3.500,00     116,67

    I know what you are talking about, it will always return 1 or zero which is true or false, I don't think you can do anything much to this. Since, the value of Ranked is getting calculated at runtime.
    thanks.
    Wond

  • XSOdata Filters

    Hi All
      I am trying to filter an XSoData URL based on a measure field but in meta data the property for the field is showing as below , the sap:filterable="false" is not allowing me to filter on this measure, I am trying to find if there is any way to change the filterable property for measures so that we can do filter on measure values.
    <Property Name="Amount" sap:label="Amount" sap:aggregation-role="measure" Type="Edm.Decimal" sap:filterable="false" Precision="34"/>
    As per my understanding oData supports filtering on Decimal data types Edm.Decimal, but it seems to be limitation from HANA side. Please correct me if I am wrong.
    Thanks
    Santosh Varada

    are you exporting self contained QT files or reference movies? I've seen some weird things happen with reference movies because the render files they are referencing aren't complete.

Maybe you are looking for

  • How to create a multi-level configuration sales order?

    Hi,     My client use configurable material to sell computers. And the production mode is MTO. One sales order item correspond with a production order     Now my client also sell array which consist of two computers, two storage, one UPS power etc. T

  • Sequence created in anon PL/SQL missing initial value

    If I create a sequence in an anonymous PL/SQL block, with execute immediate, then perform a select nextval from that sequence outside the block, it misses it's initial value. Easily reproducable here: create table tab_a ( col_a number(4) not null );

  • Viewing compliled code in PeopleSoft

    Hello Folks, I have a question. Does anyone know how to view the code behind the delivered peoplesoft functions?? For eg., I want to view the code that I written behind 'AddAttachment' or a 'Datetimetolocalizedstring' function. Is there any way that

  • Problem when sync repeat events with ical

    Hi all, I've a strange problem that happen when I sync repeated events on my mac versus iphone... With iCal I can see correctly an events repeated for example for two days... (using the option repeat every day with an end date). After syncing, on ima

  • Can I use a dictionary in iPod?

    Hi. I'm from asia.(It's secret that where is my country :D) In my country, I can buy iPod Video, too. but I have a problem. I'm really curious. Is there a dictionary, designed for iPod? If I can use dictionary in iPod, I'll buy iPod immeadiately!!!!