Calculate based on different level-based measures

Hi,
Say that I have a Sales measure and a Region dimension as the following:
Region: Country -> State -> City -> Individual Stores
The Sales measure is aggregated by SUM along the dimension. I'd like to create another measure that when the user browses to each level, the measure calculates the ratio of the current Sales measure to its immediate parent level's aggregated Sales total.
For example, at the City level, the ratio will be City.Sales / State.Sales. At the individual store level, the ratio will be IndividualStores.Sales / City.Sales.
I know I can probably create one total Sales level-based measure at each level. But then that would give me multiple ratio measures as well, which I don't want. Is there any way to have only ONE ratio measure that reflects the ratio at each level depending what level the user is viewing?
Thanks.

JLin,
I think you were right when you were saying that you could create several metrics. I looked at your requirement again and realized that those are indeed separate metrics - since they use different columns for sales. So you can:
a) create aggregate tables and set LTS there (easiest I think)
b) adjust your ETL by creating a pre-calculated column based on your requirements
c) create a long CASE statement - but I'm still not sure how to define hierarchies....variables perhaps...maybe MMA could shed some light into it....
good luck

Similar Messages

  • Creating dim, cube based on SOLVED LEVEL-BASED Dims

    Hi All,
    I have generated parent child script using cwm2_olap_pc_transform.create_script. After running this generated script, it has created 3 table/view.
    My Base Parent Child table is like this:-
    drop table PARENT_CHILD;
    create table PARENT_CHILD (PARENT varchar2(30), CHILD varchar2(30));
    insert into PARENT_CHILD values ('Eligible', 'Compliant');
    insert into PARENT_CHILD values ('Eligible', 'Non-Compliant');
    insert into PARENT_CHILD values ('All', 'Eligible');
    insert into PARENT_CHILD values ('All', 'Ineligible');
    insert into PARENT_CHILD values (null, 'All');
    After running generated script thru cwm2_olap_pc_transform.create_script, it has created :-
    Table - PARENT_CHILD_SOLVED
    View - PARENT_CHILD_SOLVED_view , PARENT_CHILD_view
    This script also inserted data in above table/view. (5 rec in each). Table/View structure is like this:-
    SQL> desc PARENT_CHILD_view
    Name Null? Type
    GID NUMBER
    CHILD1 VARCHAR2(30)
    CHILD2 VARCHAR2(30)
    CHILD3 VARCHAR2(30)
    Data:-
    0 All Eligible Compliant
    0 All Eligible Non-Compliant
    1 All Eligible
    1 All Ineligible
    3 All
    SQL> desc PARENT_CHILD_SOLVED
    Name Null? Type
    GID NUMBER
    CHILD1 VARCHAR2(30)
    CHILD2 VARCHAR2(30)
    CHILD3 VARCHAR2(30)
    Data:-
    0 All Eligible Compliant
    0 All Eligible Non-Compliant
    1 All Eligible
    1 All Ineligible
    3 All
    SQL> desc PARENT_CHILD_SOLVED_view
    Name Null? Type
    GID NUMBER
    SHORT_DESCRIPTION VARCHAR2(30)
    LONG_DESCRIPTION VARCHAR2(30)
    CHILD1 VARCHAR2(30)
    CHILD2 VARCHAR2(30)
    CHILD3 VARCHAR2(30)
    Data:-
    0 Compliant Compliant All Eligible Compliant
    0 Non-Compliant Non-Compliant All Eligible Non-Compliant
    1 Eligible Eligible All Eligible
    1 Ineligible Ineligible All Ineligible
    3 All All All
    I tried to create dim and cube based on this. I am not sure whether its correct or not! Though validate_dimension API call shows that it is valid.
    Script for Dim:-
    DECLARE
    -- variable to hold error message
    errtxt varchar(60);
    BEGIN
    -- To be on safer side just drop dimension before creating new one and catch exceptions
    BEGIN
    cwm2_olap_dimension.drop_dimension('APPS', 'HCP_DIM_PC');
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Dimension HCP_DIM_PC not dropped');
    END;
    cwm2_olap_dimension.create_dimension(
    'APPS',
    'HCP_DIM_PC',
    'Parent Child',
    NULL,
    'Parent Child',
    'Parent Child',
    NULL);
    cwm2_olap_dimension_attribute.create_dimension_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Short Description',
    'Short Description',
    'Short Description',
    'Short Description',
    TRUE);
    cwm2_olap_dimension_attribute.create_dimension_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Long Description',
    'Long Description',
    'Long Description',
    'Long Description',
    TRUE);
    cwm2_olap_dimension_attribute.create_dimension_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Grouping ID',
    'Grouping ID',
    'Grouping ID',
    'Grouping ID',
    TRUE);
    cwm2_olap_hierarchy.create_hierarchy(
    'APPS',
    'HCP_DIM_PC',
    'HCP_DIM_PC_HIER',
    'Standard',
    'Standard',
    'Standard Parent Child Hierarchy',
    'SOLVED LEVEL-BASED');
    cwm2_olap_dimension.SET_DEFAULT_DISPLAY_HIERARCHY ('APPS', 'HCP_DIM_PC', 'HCP_DIM_PC_HIER');
    cwm2_olap_level.create_level(
    'APPS',
    'HCP_DIM_PC',
    'ALL_PARENT_LVL',
    'All Parent Child',
    'All Parent Child',
    'All Parent Child',
    'All Parent Child Level');
    cwm2_olap_level_attribute.create_level_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Short Description',
    'ALL_PARENT_LVL',
    'Short Description',
    'Short Description',
    'Short Description',
    'Short Description',
    TRUE);
    cwm2_olap_level_attribute.create_level_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Long Description',
    'ALL_PARENT_LVL',
    'Long Description',
    'Long Description',
    'Long Description',
    'Long Description',
    TRUE);
    cwm2_olap_level_attribute.create_level_attribute(
    'APPS',
    'HCP_DIM_PC',
    'Grouping ID',
    'ALL_PARENT_LVL',
    'Grouping ID',
    'Grouping ID',
    'Grouping ID',
    'HTB Grouping ID',
    TRUE);
    -- Add all levels one by one to dimension hierarchy. For top most level last parameter is null.
    cwm2_olap_level.add_level_to_hierarchy(
    'APPS',
    'HCP_DIM_PC',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    NULL);
    BEGIN
    cwm2_olap_table_map.removemap_dimtbl_hierlevel(
    'APPS',
    'HCP_DIM_PC',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL');
    cwm2_olap_table_map.removemap_DimTbl_HierLevelAttr(
    'APPS', 'HCP_DIM_PC', 'Short Description', 'HCP_DIM_PC_HIER', 'ALL_PARENT_LVL', 'Short Description');
    cwm2_olap_table_map.removemap_DimTbl_HierLevelAttr(
    'APPS', 'HCP_DIM_PC', 'Long Description', 'HCP_DIM_PC_HIER', 'ALL_PARENT_LVL', 'Long Description');
    cwm2_olap_table_map.removemap_DimTbl_HierLevelAttr(
    'APPS', 'HCP_DIM_PC', 'Grouping ID', 'HCP_DIM_PC_HIER', 'ALL_PARENT_LVL', 'Grouping ID');
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('Level map for ALL_PARENT_LVL not removed');
    END;
    -- Map ALL_PARENT_LVL level to dimension table. Last parameter is null since it is top most level
    cwm2_olap_table_map.map_dimtbl_hierlevel(
    'APPS',
    'HCP_DIM_PC',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    'APPS',
    'PARENT_CHILD_SOLVED_VIEW',
    'GID',
    NULL);
    -- one by one map all the level attributes to respective columns in the dimension table.
    cwm2_olap_table_map.Map_DimTbl_HierLevelAttr(
    'APPS',
    'HCP_DIM_PC',
    'Short Description',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    'Short Description',
    'APPS',
    'PARENT_CHILD_SOLVED_VIEW',
    'SHORT_DESCRIPTION');
    cwm2_olap_table_map.Map_DimTbl_HierLevelAttr(
    'APPS',
    'HCP_DIM_PC',
    'Long Description',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    'Long Description',
    'APPS',
    'PARENT_CHILD_SOLVED_VIEW',
    'LONG_DESCRIPTION');
    cwm2_olap_table_map.Map_DimTbl_HierLevelAttr(
    'APPS',
    'HCP_DIM_PC',
    'Grouping ID',
    'HCP_DIM_PC_HIER',
    'ALL_PARENT_LVL',
    'Grouping ID',
    'APPS',
    'PARENT_CHILD_SOLVED_VIEW',
    'GID');
    -- Use cwm2_olap_validate.validate_dimension to validate the dimension
    cwm2_olap_validate.validate_dimension('APPS', 'HCP_DIM_PC');
    cwm2_olap_metadata_refresh.mr_refresh;
    -- Rollback if any exception occurs during processing this script
    EXCEPTION
    WHEN OTHERS THEN
    cwm_utility.dump_error;
    errtxt := cwm_utility.get_last_error_description;
    dbms_output.put_line('ERROR: ' || errtxt);
    ROLLBACK;
    RAISE;
    END;
    Script for Cube:-
    declare
    HCP_time_dim number;
    errtxt varchar(60);
    begin
    cwm_utility.collect_garbage;
    begin
    cwm2_olap_cube.drop_cube('APPS', 'HCP_PC_CUBE');
    exception
    when others then
    dbms_output.put_line('No HCP_PC_CUBE to drop');
    end;
    begin
    cwm2_olap_catalog.drop_catalog('HCP_PC_CAT');
    exception
    when others then
    dbms_output.put_line('No HCP_PC_CAT to drop');
    end;
    CWM2_OLAP_CUBE.Create_Cube('APPS', 'HCP_PC_CUBE', 'Parent Child Cube', 'Parent Child Cube','Parent Child Cube');
    cwm2_olap_cube.add_dimension_to_cube('APPS', 'HCP_PC_CUBE','APPS', 'HCP_DIM_PC');
    cwm2_olap_measure.create_measure('APPS', 'HCP_PC_CUBE', 'HCP_PC_MEASURE', 'PC Measure','PC Measure', 'PC Measure Fact');
    cwm2_olap_table_map.map_facttbl_levelkey('APPS','HCP_PC_CUBE','APPS','HCP_PC_FACT','ET', 'DIM:APPS.HCP_DIM_PC/HIER:HCP_DIM_PC_HIER/GID:GID/LVL:ALL_PARENT_LVL/COL:CHILD3;');
    cwm2_olap_table_map.Map_FactTbl_Measure('APPS', 'HCP_PC_CUBE','HCP_PC_MEASURE', 'APPS', 'HCP_PC_FACT', 'MEASURE_COL', 'DIM:APPS.HCP_DIM_PC/HIER:HCP_DIM_PC_HIER/GID:GID/LVL:CHILD3/COL:SHORT_DESCRIPTION;');
    cwm2_olap_catalog.create_catalog('HCP_PC_CAT', 'Parent Child Catalog');
    cwm2_olap_catalog.add_catalog_entity('HCP_PC_CAT', 'APPS', 'HCP_PC_CUBE', 'HCP_PC_MEASURE');
    cwm2_olap_validate.validate_cube('APPS', 'HCP_PC_CUBE','DEFAULT','YES');
    cwm2_olap_metadata_refresh.mr_refresh;
    exception
    when others then
    cwm_utility.dump_error;
    errtxt := cwm_utility.get_last_error_description;
    dbms_output.put_line('ERROR: ' || errtxt);
    rollback;
    raise;
    END;
    My Fact Table is :-
    DROP TABLE HCP_PC_FACT CASCADE CONSTRAINT;
    CREATE TABLE HCP_PC_FACT (
    SHORT_DESCRIPTION     VARCHAR2(30) NOT NULL,
    GID               NUMBER NOT NULL,
    CHILD1          VARCHAR2(30) NOT NULL,
    CHILD2          VARCHAR2(30) ,
    CHILD3          VARCHAR2(30) ,
    MEASURE_COL      NUMBER NOT NULL);
    Data in Fact Table:-
    insert into HCP_PC_FACT values('Compliant',0,'All','Eligible','Compliant', 100);
    insert into HCP_PC_FACT values('Non-Compliant',0,'All','Eligible','Non-Compliant', 200);
    insert into HCP_PC_FACT values('Eligible',1,'All','Eligible',null, 300);
    insert into HCP_PC_FACT values('Ineligible',1,'All','Ineligible',null, 400);
    insert into HCP_PC_FACT values('All',3,'All',null,null, 500);
    I am not sure how to create level, level attr, dim attr for such dim.
    Any complete working exapmle will be helpful.
    P.S. One more query I have can we have one solved and one un-solved dim in the same cube/measure?
    regds
    Prakash

    All CWM2 validation API shows that my all dims, cubes are valid but when I try to create presentation thru JDev it hangs after selecting Parent-Child Measure.

  • Is there any process to convert an value-based hierarchy to level-based one

    Hi Experts,
    Is there any automated or manual process to convert the value-based hierarchy to the level-based hierarchy.
    Thanks
    VR

    Using SQL's "CONNECT BY" clause and PL/SQL programming we can convert a value-based hierarchy to a level based. I have not done this myself but I am positive we can get it to work.

  • Measures in different levels

    I am having problems with measures based on different levels of a dimension.
    The situation is: I have a product dimension with 2 levels (category and detail) and a client dimension. I want a measure with the number of distinct clients wich buys each product (it works fine with count distinct). But I also want a measure with the number of distinct clients wich buys the category of products, wich it's not working.
    I have tried level based measures, but it didn't show the right result. I have changed the aggregate rule for this measure to count distinct, but it shows the same result as the SUM.
    Can I define a custom rule for aggregation based on attributes of another tables?
    Does anyone know a solution for this?

    The output of the reports needs to be as below which shows details of a single customer.
    customer_name---ca_number-----obl_number--------gl_balance--------limit_available-----state
    Krio motors---------222222222-----763764754---------37000.00--------1834297.00--------CA
    Krio motors---------222222222-----326635675---------34820.00--------1834297.00--------CA
    Krio motors---------111111111-----326684759---------670000.00------3456789.00--------CA
    Krio motors---------111111111-----326611111---------32400.00--------3456789.00--------CA
    Krio motors---------111111111-----326622222---------8700.00----------3456789.00--------CA
    Krio motors---------111111111-----326633333---------632450.00------3456789.00--------CA
    here for each record in dimension D6 (for each Ca_number) there are many records in dimension D1 (obl_number records)
    The limit_available is at ca_number level (higher level) and gl_balance is in obl_number detail level.
    Thank you.

  • Different levels of a dimension

    I am having problems with measures based on different levels of a dimension.
    The situation is: I have a product dimension with 2 levels (category and detail) and a client dimension. I want a measure with the number of distinct clients wich buys each product (it works fine with count distinct). But I also want a measure with the number of distinct clients wich buys the category of products, wich it's not working.
    I have tried level based measures, but it didn't show the right result. I have changed the aggregate rule for this measure to count distinct, but it shows the same result as the SUM.
    Can I define a custom rule for aggregation based on attributes of another tables?
    Does anyone know a solution for this?

    Luciene,
    Is your requirement to have seperate metric for the category and a seperate metric for the detail level? if so then you can duplicate the count distinct metric and specify the level for the product dimension.( for the category metric it would be at the category level and for the detail metric it would be at the detail level). But on the other hand if you want the same metric to act at different levels, then you don't have to create a level based metric. Pulling the category/detail and the metric would aggregate the metric to the specific level.
    Arjun

  • Howto create special level based measure

    Hi all
    I have a geography dimension :
    All
    -Region
    --coutry
    ---store
    I'm reporting the sales per year:
    I need to create a measure that able the user to display 'shareof sales' for every level in the hierarchy.
    In other words In need a logical column that allows the user to see :
    store sales /total of 'country sales '
    country sales /total of 'Region sales'
    Region sales/total of 'All sales'
    I created 3 level based measure with different levels for every one and calculate the 3 'shareof sales'.I had a correct result But the user wants to have only one logical column representing all the combinations and using different levels of the hierarchy as lowest level .
    Is it possible to create this kind of calculation?

    Thanks stijn
    Yes he wants "sales by store"/"total country sales" when a store is in the report and "sales by country"/"total region sales" when country is in the report, but he also wants to "sales by lowest level of detail" / "sales by lowest + 2 level of detail" when store is in the report and this using the same logical column.
    But how do you create a measure which is aggregated by the lowest +1 level of detail?
    No i didn't create this aggregation and I don't know if it's possible.so I don't realy have "sales by country"/"total region sales" when country is in the report.
    Do you know what I mean? So actually you want the BI Server to find out what the higher level in the hierarchy is. I'm not aware of a function which could do this.
    Actually as you said is their any way to make the server aware of this or every thing need to be decided in the repository before??
    Regards
    Edited by: aharrab_be on Jan 28, 2009 6:55 AM

  • Issue with Level-based measure at Year level

    Hello everyone,
    I am facing weird issue while using OBIEE 11g level-based measure at the Year level. I am creating a trend analysis report that are displaying Expense Accounts dimension with 6 levels and 2 measures: Expense YTD, and Expense Full Year measures
    The report has multiple rows with value "Others" in the 3rd level of the account dimension (Account Level 3) yet, they all have different IDs and associated with different parents (different Account Level 2 values)...
    When i displaying the Expense YTD measure only results are fine and everything is perfect, when selecting Expense Full Year measure, only the first occurrence of the value "Others" in 3rd level column is displayed and non of the remaining records appears...
    What makes my life worse is that i can't even see the log file of this query because an error occurs when trying to view the session log i.e. "No log file found"
    Please help, i am about to start the UAT phase of the current project and i am running out of time..
    Thanks
    Mohamed Adel

    Hi,
    Are you using presentation hierarchy?
    Refer below if same is followed-
    http://gerardnico.com/wiki/dat/obiee/hierarchy_level_based
    Hope this helped/ answered.
    Regards
    MuRam

  • Query regarding Level Based Measure on Reports

    Hi All,
    I am facing an issue in OBIEE while using aggregate measures.
    Scenario
    My Report has the following columns. There is security applied on the report ie an Employee who logs in gets to see only his/her data.
    1) Employee
    2) Month
    3) Monthly Sales
    4) Org Sales(Aggregate Sales at Organization Level)
    My Issue is that even when an Employee does not have any Monthly Sales for a Month (no entry for the employee in the dimension table)  it displays results for Org Sales. So I have a report that looks like given below.
    Please note - There is no entry for this employee in the Dimension table for this month.
    Employee
    Month 
    Monthly Sales 
    Org Sales
    12000
    I do not want the report to display any value when there is no monthly Sales for the Employee. From the back end, I can see that there are 2 separate queries generated for this report. 1 for the fetching the Monthly Sales for the Employee and 1 for fetching the Org Sales. If I apply a condition saying Employee IS NOT NULL, it gets applied on the first query.
    Is there some workaround to make sure that the report does not come up or show some message when Employee data is not returned by the first query
    Thanks
    X

    hi Devarasu,
    Thanks mate.
    I know how level based measure works.
    But in my case The Hierarchy is bit different The UDA is part of Product hierarchy but its not the Child of Subdivision,
    I think problem is occurring because of that only but i am not sure
    anyone have any idea about this kind of hierarchy and level based measures?
    Thanks

  • Question in Calclating Level based measure

    Hi all:
    I have a requirement, where I need to calculate a level based measure. Here is a thing though.
    Let me give you sample data.This is what the data in the table in database looks like
    company ||||account||||| product|||||subproduct||||||quantity||||||| amount
    http://i.imgur.com/1CfXd.png
    Amount column is at company-account-product combination level.. (It is loaded in the database table as same for each company-account-product combination. If you see the First image, amount is 100 for that company-accont- product combination level..
    Quantity is at sub product level...
    I need to display a report with these columns:
    Company||||| account|||||| product||||||||| subproduct||||||||| quantity||||||| amount|||||total quantity
    http://i.imgur.com/KLgBg.png
    The last column Total quantity should be at company-account-product combination level. Not at sub product level.
    see the above picture for detailed idea. Total quantity for first company-account-product combination is 5 and for the below one, its 10
    One thing is that I donot have Dimension tables for Account, product, company. They come from the fact itself.
    I guess level based measure will solve the problem. If so, how do I create a level based measure for Total Quantity column when there are no dimension tables?

    We got two types of grouping Logical level and column level
    We go for Logical level in most cases since we are going with default or defined dimension hierarchy for each logical table, we go with column level when you dont have hierarchy.
    See that can you go with column level using properties of measure
    General->Content-> choose column for 'Aggregate content, gorup by'
    Edited by: Srini VEERAVALLI on Dec 16, 2012 1:47 PM

  • Level Based Measures

    Hi Experts,
    please clarify my doubts .
    1. I created 3 level based measures. Year level Revenue, Quarter level Revenue and Month level revenue. And I do have Revenue column which is not at any level.
    Report:
    I put "Date" , "Year based Revenue" , "Quarter based Revenue" and "Month based Revenue" in a report.
    Everything works fine.
    But when i add ' Revenue' Column (not specific to any level) to this report, all values of level based measures changes. Why does this happen. And how to overcome this?
    2. Also when i add columns from other dimensions(Like ProductName) , values of all these level based measures in previous report changes.
    My questioin is why do these fields change their values when someone else comes into picture.(Though they are called level based measures !)
    Is there any way to hold a particular value in a field no matter which ever field comes in a report?
    Thanks in Advance
    Jaan

    Hi Pramod,
    It's customary to award points to Nico for helping you with your question. Could you also set the thread to Answered so other users can take advantage of your work in case they have the same problem?
    Thanks!
    -Joe

  • Level Based Measure and a column based on that

    Hello All,
    I need suggestions to implement the following requirement.
    1. No of orders stored in a fact table at day level
    2. No. of orders at month level should be calculated
    3. Depending on the count, each month would be assigned to a bucket.
    0-10 orders -> B1
    11-100 orders -> B2
    > 100 orders -> B3
    What I did in RPD
    1. fact joined to time dimension
    2. created a logical column: ORDER_COUNT: count(distinct order_number) iand set the level = month
    3. created a logical column: BUCKET: using the output of above logical column and CASE statement to implement the bucket rule.
    Now, when I run a report like this:
    Year; ORDER_COUNT; BUCKET
    Returns me 12 rows. Understood because ORDER_COUNT is a month level measure
    E.g.
    2011 5 B1
    2011 5 B1
    2011 15 B2
    2011 15 B2
    2011 5 B1
    2011 5 B1
    2011 15 B2
    2011 15 B2
    2011 5 B1
    2011 5 B1
    2011 15 B2
    2011 15 B2
    But as soon as I pull the BUCKET column as column heading in pivot table, it returns me only the 1st month row and changes the "BUCKET" value to B3.
    Looks like, it recalculates the bucket and sums up all 12 months orders and then applies the bucket rule.
    Like this -
    B3
    2011 5
    My expectation was something like this
    B1 B2 B3
    2011 30 90 0
    where 30 is the sum of the order_counts of all B1 months, <m>
    Ques:
    1. Is there a way I can avoid the recalculation of bucket information when the granularity/dimensionality changes in the report
    2. I read in the below link that if the grain of the report > grain of the level-based-measure then the output of the report is "not-deterministic"
    Am I hitting that scenario?
    [http://gerardnico.com/wiki/dat/obiee/measure_level_based]
    Any suggestion would be highly appreciated.
    I am using 11.1.1.6.2 version.
    Thanks & Regards
    Monika

    Hi ,
    If I understand your requirement  correctly , then you need currency Conversion.
    you can refer this links.
    http://consultingblogs.emc.com/christianwade/archive/2006/08/24/Currency-Conversion-in-Analysis-Services-2005.aspx
    http://www.ssas-info.com/analysis-services-faq/27-mdx/244-how-change-currency-symbol-based-on-selected-currency-dimension-member
    http://social.technet.microsoft.com/wiki/contents/articles/18672.currency-conversion-in-ssas-2012-multidimensional-tabular.aspx
    May I know , You Require all this using MDX and SSRS Parameter ?
    Thanks

  • Level based measure and AGO function

    Hi,
    I've a TIME fact table with a single dimension (TIME_DIM) and a single measure (WORK_DAY).
    WORK_DAY is 1 if the day is a working day, otherwise it is 0.
    This way I can get the number of working days by month, quarter and year.
    (TIME is a logical fact table. WORK_DAY is phsical stored inside the physical TIME_DIM).
    To have WORK_DAY work correctly when used with others fact tables, I've defined it as a level based measure, where all the dimensions are set to the "total" level, apart TIME_DIM.
    So far so good.
    Then I created a new calculated measure WORK_DAY_PREVIOUS_YEAR.
    I used the AGO function this way: AGO (TIME.WORK_DAY, TIME_HIERARCHY.YEAR, 1)
    No complains by OBIEE, but this column always returns 1...
    I've no trouble using level based measures.
    I've no trouble using AGO.
    But if I mix them together they no longer work.
    Do you experience this issue? Any workaround?
    I'm using OBIEE 11.1.1.5
    Regards,
    Corraod

    What is the month level key column functionality in your time dimension?
    it should be in format of yyyymm but not in just mm ..

  • OBIEE Multiple Facts With Level Based Measures

    Gurus,
    We have a requirement which we think complex to achieve at OBIEE level. Please help if anyone knows a solid solution for this problem.
    Orders, Shipments and Revenue are the fact tables and we have common dimensions like customer, product, time and others. For each fact table there is a corresponding dimension to store the non metric columns like Order Number and Shipment Number.
    Now the requirement from the customer is
    1. Need to see the Order Information completely even though he is looking at Shipment or Revenue data. Ideally, it is not mandatory for each order to have Shipment or Revenue. This is applicable for Shipment too, if the customer is looking at revenue and shipment data he needs see all the shipments including those that doesn't have any revenue.
    2. Non Confirming dimensions should not throw errors. This could be possible by using Level based measures.
    Please help with your thoughts here. Thanks in advance.
    Siva

    Hi,
    Create left outer join from Order Number to Revenue Fact and from Shipment Number to Revenue Fact.
    Now when you create a report you will get all Orders and Shipments.
    It will impact the performance of the reports though.
    or you can try creating a union report as
    Customer Order Number Shipment Number Revenue Quantity >>>>>>>> This will give you orders which have Revenue
    Union
    Customer Order Number Shipment Number 0 >>>>>>>> This will give all orders and shipments
    Hope this helps.
    Thanks

  • Formatting metrics in a pivot table differently based on a unit of measure

    I have a generic metrics table with columns for METRIC NAME, UNIT OF MEASURE, ACTUAL VALUE, BUDGETED VALUE, and PRIOR YEAR VALUE. Each metric has a unit of measure associated to it, and I need to be able to format these metrics differently in the same field based on that unit of measure.
    For example, I may have an actual value for a "cost per unit" that needs to be formatted in dollars to 3 decimal places (Unit of measure = USD3) while another metric may be a simple "number of items" that needs to be formatted as numberic to 0 decimal places (NUM0).
    Has anyone ever formatted the same column in OBIEE with different data formats depending on the unit of measure needed? I know I can conditionally format the cell with colors or images, but I haven't figured out how to change the data format in a table or pivot table.

    Hi,
    I've read all the tips that are offered in this forum. I tried all the solutions provided here, but I can not get the grand total formatted conditionally, what I get is the following error nell'answer:
    DXE compiler error. No table 'GTGT' found in DXE. Source name: DxeAPI. XML: None
    Error details
    Codici di errore: YV3KVTDM
    Location: saw.hypercube.dxeApi, saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool.socketrpcserver, saw.threads
    I'm use the version: OBIEE 11.1.1.6.2
    Anyone have any ideas for me?!

  • Issue with Level-Based Measure Calculations

    Hi all
    Edited by: aharrab_be on Jan 19, 2009 7:23 AM
    I've just understood the meaning of those level based measure and It's not very useful for this purpose
    Sorry
    Edited by: aharrab_be on Jan 19, 2009 7:24 AM

    Hi,
    Are you using presentation hierarchy?
    Refer below if same is followed-
    http://gerardnico.com/wiki/dat/obiee/hierarchy_level_based
    Hope this helped/ answered.
    Regards
    MuRam

Maybe you are looking for

  • [SOLVED]Mplayer2 and Clementine both missing libraries.

    After upgrading a few days ago, SMPlayer2 fails to play any media, and Clementine won't start at all. SMPlayer says this: /usr/bin/mplayer: error while loading shared libraries: libpng15.so.15: cannot open shared object file: No such file or director

  • Asset Value less than 5%

    Dear All, we want the list of all assets whose value is less than or equal to 5% in the respective fiscal year,so that we can scrap those assets. Is there any SAP Stand report/program available for our requirement,if so suggest. If not,suggest any ot

  • New to xMII

    HI Experts, I am new to MII and got new requirement in MII. I need to capture the data of Process Order from SAP and sent to MII. Please suggest me how to approach this scenario. Whether to use BAPI or IDOC or any other way to do it?? Thanks in advan

  • How to debug form.js ?

    I have this file (form.js) with some javascript functions invoked from mine UIX pages. 1) If I create a custom.js file, how can I make it available form my pages? 2) How can I step-by-step debug this file? Breakpoints are ignored there. Thanks

  • Query to format result

    SQL> select * from a; T S TEACHER1 STUDENT1 TEACHER1 STUDENT2 TEACHER1 STUDENT3 TEACHER2 STUDENT1 TEACHER2 STUDENT2 I'm trying to format the result to be Teacher All Students TEACHER1 STUDENT1, STUDENT2, STUDENT3 TEACHER2 STUDENT1, STUDENT2 Any help