Calculate measures in DW or Cube

Our OLTP data source contains multiple measurement records for a single day from multiple sites (date time stamped)
Our DW has granularity of a day (Year - Quarter - Month - Week - Day)
If we are interested in the average value of each measurement for a single day, should I perform this calculation during the ETL process (and store one record per day per site) or should I store all records in our DW and calculate the average value of each
measurement in our OLAP cube?

I agree that we can calculate the average values using our cube. 
However, if our DW has granularity of a day then we cannot store the same date key more than once in our fact table. 
Should we maybe extract the most recent value for each measurement each day?
We can then aggregate using sum / count as average measure type does not exist in SSAS.
If you're keeping at day level then averages for day will average of all measurements for the day. while doing for month it has to sum of all month measurement / total count for month etc
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • Calculate measure using dates

    I am facing difficulty to calculate date difference of two dates
    Dimension contains ID, Name, CreateDate, CloseDate
    I would like to calculate CreateDate - CloseDate but i am getting #error by creating calculate measure within the CUBE
    datediff("d",[Dim].[CreateDate].currentmember.membervalue,[Dim].[CloseDate].currentmember.membervalue)
    but same statement is working using MDX
    with Member [Measures].[Age] as
    datediff("d",[Dim].[CreateDate].currentmember.membervalue,[Dim].[CloseDate].currentmember.membervalue)
    select [Age] on 0,
    {[Dim].[Id].children*[Dim].[CloseDate].children*[Dim].[CreateDate].children} on 1
    from [cube]
    Any idea, where am i doing mistake OR what is the way to calculate within the cube?
    RaghuM

    Hi Raghum,
    According to your description, there are two columns CreteDate and CloseDate in your table, you want to add a calculation to calculate the value (CreateDate-CloseDate), right?
    In this case, you can add a calculation to your data source view, and then use the calculated column as the new measures. A named calculation is a SQL expression represented as a calculated column. This expression appears and behaves as a column in the table.
    Please refer to the link below to see the details.
    http://msdn.microsoft.com/en-us/library/ms174859.aspx
    Besides, here is a similar issue with your, please see:
    http://social.msdn.microsoft.com/forums/sqlserver/en-US/7cbf7471-141f-48ee-a6e3-2f3298dca2eb/date-difference-calculation-in-ssas
    Regards,
    Charlie Liao
    TechNet Community Support

  • Errors in the OLAP storage engine: An error occurred while processing the indexes for the partition of the measure group of the cube from the database.

    Errors in the OLAP storage engine: An error occurred while processing the indexes for the partition of the measure group of the cube from the database.
    I have dropped and recreated a fact table to refresh the data as the table is having identity columns. So not able to directly insert data. After that cube is throwing above error.
    Please suggest.

    Hi Md,
    It hard to analyse the issue base on the limited information, Are there any error message on the log? Under C:\Program Files\Microsoft SQL Server\MSAS11.\OLAP\Log (this could be different for your server), there are 3 log files that are generated:
    msmdrrv.log
    FlightRecorderCurrent.trc
    FightRecorderBack.trc
    The msmdrrv.log simply points to the other two logs. There might be some detail information for this error. Please provide us the detail information about it, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Error occurred while processing the "sales" partition of the "sales" measure group in the cube

    Hi 
    when i ran the job for processing the cube it showing the error like "error occurred while processing the sales partition of the sales measure group in the cube". but in log files no error massage was there. after get that error message we ran
    the cube manually
    at that time the cube executed  successfully. 
    my aim when the job was run it will be process automatically but it is not like that.
    can you suggest  the solution.
    thank you
    satyak248

    Hi Satyak248,
    According to your description, you get the error when using Windows Task to process a cube on a schedule, however can process the cube on SSMS successful manually, right?
    In your scenario, you can process the cube manually, the issue can be cause by Windows Task was not set correctly. So you can try to process the cube using SSIS package. The Analysis Services Processing Task in SQL Server Integration Services (SSIS) allows
    for the processing of one to many to all Analysis Services objects in an SSIS package. Once the SSIS package is created, then a job can be created within the SQL Server Management Studio which will allow for scheduling.
    http://www.mssqltips.com/sqlservertip/2994/configuring-the-analysis-services-processing-task-in-sql-server-2012-integration-services/
    Regards,
    Charlie Liao
    TechNet Community Support

  • Different aggregation operators for the measures in a compressed cube

    I am using OWB 10gR2 to create a cube and its dimensions (deployed into a 10gR2 database). Since the cube has 11 dimensions I set all dimensions to sparse and the cube to compressed. The cube has 4 measures, two of them have SUM as aggregation operator for the TIME dimensions the other two should have AVERAGE (or FIRST). I have SUM for all other dimensions.
    After loading data into the cube for the first time I realized that the aggregation for the TIME dimension was not always (although sometimes) correct. It was really strange because either the aggregated values were correct (for SUM and for AVERAGE) or seemed to be "near" the correct result (like average of 145.279 and 145.281 is 145.282 instead of 145.280 or 122+44+16=180 instead of 182). For all other dimensions the aggregation was OK.
    Now I have the following questions:
    1. Is it possible to have different aggregations for different measures in the same COMPRESSED cube?
    2. Is it possible to have the AVERAGE or FIRST aggregation operator for measures in a COMPRESSED cube?
    For a 10gR1 database the answer would be NO, but for a 10gR2 database I do not know. I could not find the answer, neither in the Oracle documentation nor somewhere else.

    What I found in Oracle presentation is that in 10GR2 compressed cube enhancements support all aggregation methods except weighted methods (first, last, minimum, maximum and so on). It is from September 2005 so maybe something changed since then.
    Regarding your question about the results I think it is caused by the fact that calculation are made on doubles and then there is a compression, so maybe precsion is lost a little bit :(. I really am curious whether it is because of numeric (precision loss) issues.

  • How do u calculate the subset of the  cube in essbase?

    how do u calculate the subset of the cube in essbase?
    please suggest.........

    Suggest you read - http://download.oracle.com/docs/cd/E17236_01/epm.1112/esb_dbag/dcadevcs.html#dcadevcs63536
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to get all the measure names in a cube

    Hello,
    How can I get the list of all measures in a SSAS database or cube by MDX / XMLA.
    If I get the details like what are all aggregations used and under which folder the measures available that will be great.
    We can get the same by SQL and i would like to get the same from a cube.
    SQL:
    select column_name from information_schema.columns
     where table_name = 'MyTable'
    order by ordinal_position
    Regards,
    Palash

    Hi Palash
    Please see the belwo DMV (Dynamic Management View) which will get the same by SQL.
    All Cubes in database 
    SELECT [CATALOG_NAME] AS [DATABASE],CUBE_CAPTION AS [CUBE/PERSPECTIVE],BASE_CUBE_NAME FROM $system.MDSchema_Cubes WHERE CUBE_SOURCE=1
    All dimensions in Cube 
    SELECT [CATALOG_NAME] as [DATABASE], CUBE_NAME AS [CUBE],DIMENSION_CAPTION AS [DIMENSION]  FROM $system.MDSchema_Dimensions 
    WHERE CUBE_NAME  ='Adventure Works' AND DIMENSION_CAPTION  'Measures'
    --All Attributes 
    SELECT [CATALOG_NAME] as [DATABASE],  CUBE_NAME AS [CUBE],[DIMENSION_UNIQUE_NAME] AS [DIMENSION],  HIERARCHY_DISPLAY_FOLDER AS [FOLDER],HIERARCHY_CAPTION AS [DIMENSION ATTRIBUTE],  HIERARCHY_IS_VISIBLE AS [VISIBLE]  FROM $system.MDSchema_hierarchies 
    WHERE CUBE_NAME  ='Adventure Works' AND HIERARCHY_ORIGIN=2 
    All Hierarchies (user-defined) 
    SELECT [CATALOG_NAME] as [DATABASE],  CUBE_NAME AS [CUBE],[DIMENSION_UNIQUE_NAME] AS [DIMENSION],  HIERARCHY_DISPLAY_FOLDER AS [FOLDER],HIERARCHY_CAPTION AS [HIERARCHY],  HIERARCHY_IS_VISIBLE AS [VISIBLE] 
    FROM $system.MDSchema_hierarchies 
    WHERE CUBE_NAME  ='Adventure Works' and HIERARCHY_ORIGIN=1 
    All Measures 
    SELECT [CATALOG_NAME] as [DATABASE],  CUBE_NAME AS [CUBE],[MEASUREGROUP_NAME] AS [FOLDER],[MEASURE_CAPTION] AS [MEASURE],[MEASURE_IS_VISIBLE] 
    FROM $SYSTEM.MDSCHEMA_MEASURES 
    WHERE CUBE_NAME  ='Adventure Works'
    SUHAS http://suhaskudekar.blogspot.com/ Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.

  • Calculate measure in parent child hierarchy

    Halo everyone
    I have a requirement about parent child hierarchy namely:
    1. see the following picture as a sample.
    the situation I got here is every employee has its own measure (Sales Amount). when it rolls up to 'Employee1' so the Sales will calculate all measure (Employee1 and all the descendents) but when it drill down, 'Employee1' will ONLY show its own 'measure' (it does'nt calculate from its descendents).
    Any suggestion, Any idea, Any sharing, Any inspiration would be appreciated. thanks alot.

    Hi Vin,
    We can use Descendants() funcion, which returns the set of descendants of a member at a specified level or distance, optionally including or excluding descendants in other levels.
    Please refer to the document below:
    http://msdn.microsoft.com/en-us/library/ms146075.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • SSM Calculate Measure

    Hi experts!!
    I want to ask you advice on how could I achieve this:
    I have a KPI that has 5 measures (Number of days, Actual Volume, Actual Volume Cumulative, Target Volume and Target Volume Cumulative), and I need to show in Scorecard depending on the Period selected:
    If I select last month, I need to show Actual Volume and Target Volume, but if I choose any different option like last quarter, or last year, I need to show Actual Volume Cumulative and Target Volume Cumulative.
    That is because the normal Cumulative (last quarter or last year) makes a sum. And the Cumulative calcule that I need to show is different.
    I already have these measures calculated in BW, and I got the values in PAS.
    Any Idea??
    Thanks a lot!
    Ingrid J.

    If the measure is defined as SUM() then wont the quarter (or year) give you the cumulative number already? Obviously I am not understanding the problem.
    You can change the measure from SUM(). Option include to AVERAGE(), FIRST() LAST() and WEIGHTED(). Will any of these give the results you're after? Weighted is especially versatile because you can put all sorts of smart values in the weighting variable.
    If these don't help another solutions is as follows:
    Create a second set of measures (ACT and TAR) and load your monthly values to these. They are just a holding area and will never be displayed
    Define your real ACT and TAR as FIRST()
    In a procedure copy the latest month from the second set of measures to your real measures.
    In a procedure calculate the latest quarterly value (from the second measure) and store it in the first month of the latest quarter of the real measure. Do this for both ACT and TAR.
    In a procedure calculate the latest yearly value (from the second measure) and store it in the first month of the latest year of the real measure.Do this for both ACT and TAR.
    Because the real measures are defined as FIRST,reporting a Quarterly or YEARLY value will display the number stored in the first month of that period and ignore all others.

  • How to calculate total stock quantity in cube

    Dear Master
        I want to verify the data between BI report and cube whether correct or not.My report name is stock summary. It's giving report for Total quantity stock (0TOTALSTCK) for paricular date. This KF(0TOTALSTCK) inflow is 0RECTOTSTCK and outflow is 0ISSTOTSTCK. Somebody telling to get the Total quantity stock (0TOTALSTCK) value, I have to use following formula 0RECVS_VAL (Value Received into Valuated Stock) - 0ISSVS_VAL (Value issued from valuated stock). Please advice me which formula should I use to get the total stock quantity?.
    Thanks a lot in advance
    Raja

    Please let met understand better, you have the following keyfigures:
    - Receipts (Cumulative)
    - Issues (Cumulative)
    - Difference (Cumulative) populated during URules = Receipts - Issues (any routine with elaborated calculation behind?
    - Stock (non-cumulative InFlow = Receipts, OutFlow = Issues)...
    Is this correct?
    Olivier.

  • Based on the user response need to calculate measures in universe

    Hello Folks,
    I have report where user prompts for the single day (Ex: OCT 1 2014).All calculations should be at universe layer.
    1.Based on the user response I need to create a report for previous months .
    2. PYTD and YTD measures based on user prompt from universe. [PYTD - JAN 1 2013-OCT 1 2013, YTD - Jan 1 2014- OCT 1 2014].
    Example Date Set :
    DIM 1                    SEP13...............................................................OCT 14      PYTD   YTD
    Florida  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    Arizona  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    M1...M6 are the measures need to come from universe based on the user prompt.
    M1,M2 Need to give previous 13 months based on user response.
    M3,M5 [PYTD - JAN 1 2013-OCT 1 2013]
    M4,M6 YTD - Jan 1 2014- OCT 1 2014].
    Thanks for your help in advance.

    Hello Folks,
    I have report where user prompts for the single day (Ex: OCT 1 2014).All calculations should be at universe layer.
    1.Based on the user response I need to create a report for previous months .
    2. PYTD and YTD measures based on user prompt from universe. [PYTD - JAN 1 2013-OCT 1 2013, YTD - Jan 1 2014- OCT 1 2014].
    Example Date Set :
    DIM 1                    SEP13...............................................................OCT 14      PYTD   YTD
    Florida  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    Arizona  state        M1.Single value need to give previous 13 months data    M3        M4
                 federal    M2..Single value need to give previous 13 months data   M5       M6.
    M1...M6 are the measures need to come from universe based on the user prompt.
    M1,M2 Need to give previous 13 months based on user response.
    M3,M5 [PYTD - JAN 1 2013-OCT 1 2013]
    M4,M6 YTD - Jan 1 2014- OCT 1 2014].
    Thanks for your help in advance.

  • String measures in Analysis services cube

    Hi,
    I am having the requirement where I have to use string as measures. Is this possible in Analysis services 2K.
    Any help on this will be greatly appreciated

    Hi,
     Darren Gosbell wrote:
    Have you see this site? http://www.sqlserveranalysisservices.com
    It has a couple of links on the lower left that discuss various cell annotation approaches in more detail than the discussion in this thread.
    Thanks, following the article "More on cell annotation" I have been able to have String Measures.
    a+, =)
    -=Clément=-

  • How do I clear out the measure data in a 10g cube?

    Does anyone know of an OLAP feature that I could call to zero out the measures stored in the cube before I refresh from the source data?
    I'm new to Oracle OLAP, but I have some experience with Essbase and I have quite a bit of experience with Oracle PL/SQL. The database is 10g.
    Here's my problem. My dimensions and cube are mapped to Oracle tables. I've built an Oracle procedure, using DBMS_LOB / xml_clob functionality, to refresh my cube. The procedure worked successfully to initially load the data. It works successfully when changing the dollar amounts in source data. But it's possible that a record in my source data can be totally removed. When this happens, the dollars from the removed record are still showing up in the cube total after the procedure executes. I had assumed the CleanMeasures="true" parameter would take care of this, but it is not.
    thanks,
    Nancy
    Here's the parameters I'm passing to BuildDatabase in my Oracle procedure:
    ' <BuildDatabase Id="Action2" AWName="BUDGET.BUDGETS" BuildType="EXECUTE"
    RunSolve="true" CleanMeasures="true" CleanAttrs="true" CleanDim="true"
    TrackStatus="false" MaxJobQueues="0">';

    If you are doing a reload every time then you can issue following commands to clear data from cube.
    lmt name to all
    allstat
    clear all from <cubename>prttopvar
    You can wrap above commands in pl sql procedure using dbms_aw.execute package and execute it before cube load starts. Instead of clearing it from whole cube you can clear only from one partition also. Just take a look at clear command in olap DML 10.2 reference.
    Thanks,
    Brijesh
    Edited by: Brijesh Gaur on Aug 10, 2010 6:47 AM

  • How to create cube and measure in sql?

    How to create cube and measure in sql?

    Cubes, measures and dimensions are created in the AW using the Java API for Analytic Workspaces or through XML documents that are processed by this API. SQL commands are not available for creating cubes, measures or OLAP dimensions.

  • Cube measures friendly names

    Hi,
    We want to display freindlier names for certain cube measures in the Performance Point dashboard grid.
    How is it possible?
    And if changing the measure name in the cube is the only option, is there someplace where we can note the more technical exact definision of the measure?
    Thanks
    Namnami

    Hello,
       You can create translations for only the ones u need and leave the other blank in which case the original measure names would be displayed .
    Regards,
    Bharath

Maybe you are looking for

  • How to embed obiee dashboard in web page?

    Hi All.. I have created repository in obiee with xml as a data source. On that repository I have built some dashboards. Now I want to publish that dashboards on website for clients information. So,is there any way to do this? Is there any option like

  • No data found Error

    Hi all , Following code throwing no data found error. It is working properly for IF x <> 0 condition but when count(*) is 0 then it's thrrowing error. earlier same code working properly as our client is using this application. code on when_button_pre

  • Help me in sending mails using Javamail

    Hi guys this is my first Topic on thid Forum, expecting 'the best' response from any of u. I just want a class that takes a message and recipients address & sends a mail. I would really be obliged if some one can give me a very little class for it. T

  • Loading accounts through flatfile activesync

    Hi All, I am trying to load accounts through flatfile, but after a few trials came to know that we can't load accounts through flatfile activesync (am I right). Then I loaded accounts through 'Bulk load' option. well, the accounts are loaded. when I

  • Putting Checkboxes inside a list

    ive downloaded this sample from http://blogs.adobe.com/aharui/ and im tryin to use it in my course management application. im using amfphp 1.9 i simply want the app to retrieve the list of courses available and populate a list which will the be used