Level based Measures Not totalling up correctly

Hi All,
I have created a level based measure F.C1 with level set to Dim B.C1 detail level. In Pivot report I have 3 columns Dim B.C1, Dim A.C1 and Fact F.C1. The pivot table by default groups the fact measure F.C1 by Dim B.C1 and Dim A.C1 in the backend query. I want this report to be only grouped by Dim B.C1 i.e. set in the level based measure of F.C1.
Is this possible?
With Regards
Prads
Edited by: Prads on Aug 18, 2010 9:01 AM
Edited by: Prads on Aug 18, 2010 9:02 AM

Hi,
the Problem is still not fixed.
A LBM at the Grand Total Level works great. If I set a LBM to a Level below its not longer frozen if I add any Fact.
Here is the SQL-Statement generated if I do the following:
I created one LBM and set it to the Grand Total and another one set it to a Level below (Region).
select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4,
D1.c5 as c5,
D1.c6 as c6
from
(select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4,
D1.c5 as c5,
D1.c6 as c6
from
(select D1.c2 as c1,
D1.c4 as c2,
D2.c1 as c3,
D1.c1 as c4,
D1.c3 as c5,
D1.c5 as c6,
ROW_NUMBER() OVER (PARTITION BY D1.c2, D1.c4, D1.c5 ORDER BY D1.c2 ASC, D1.c4 ASC, D1.c5 ASC) as c7
from
(select D1.c1 as c1,
D1.c2 as c2,
D1.c3 as c3,
D1.c4 as c4,
D1.c5 as c5
from
(select sum(D1.c1) over (partition by D1.c2) as c1,
D1.c2 as c2,
sum(D1.c3) over (partition by D1.c5, D1.c2) as c3,
D1.c4 as c4,
D1.c5 as c5,
ROW_NUMBER() OVER (PARTITION BY D1.c5 ORDER BY D1.c5 ASC) as c6
from
(select count(distinct T196.MASTER_CUSTOMER_KEY) as c1,
T1365.REGION as c2,
count(distinct T196.MASTER_CUSTOMER_KEY) as c3,
T1365.COUNTRY_NAME as c4,
T1365.COUNTRY_CODE as c5
from
GEOGRAPHIC_DIM T1365,
SALES_FACT T196
where ( T196.COUNTRY_CODE = T1365.COUNTRY_CODE )
group by T1365.COUNTRY_CODE, T1365.COUNTRY_NAME, T1365.REGION
) D1
) D1
where ( D1.c6 = 1 )
) D1,
(select count(distinct T196.MASTER_CUSTOMER_KEY) as c1
from
SALES_FACT T196
) D2
The Grand Total LBM shows the correct Data, the Region-LBM not.
The Region-LBM is not calculated in a separate statement.
I don't know why?

Similar Messages

  • Level Based Measures not working

    Hi,
    I've put an LBM at the second Level (Region) of a Dimension called GeographicDIM.
    the Dimension looks like:
    Total, Region, Country
    The LBM is called #Customer_ID_Region, created as new a Logical column of an existing logical Column of my Fact, aggregation.
    If I create a Report with Region, Country, the LBM is correct. then I add another logical Column from the FACT, eg. Revenue_SUM, or Customer_key_Count, the LBM isn't frozen any longer.
    This happens also if I switch place any LBM to an other Dimensions.
    What could it be?
    Thanks in advance
    Frank

    Hi,
    the Problem is still not fixed.
    A LBM at the Grand Total Level works great. If I set a LBM to a Level below its not longer frozen if I add any Fact.
    Here is the SQL-Statement generated if I do the following:
    I created one LBM and set it to the Grand Total and another one set it to a Level below (Region).
    select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6
    from
    (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    D1.c6 as c6
    from
    (select D1.c2 as c1,
    D1.c4 as c2,
    D2.c1 as c3,
    D1.c1 as c4,
    D1.c3 as c5,
    D1.c5 as c6,
    ROW_NUMBER() OVER (PARTITION BY D1.c2, D1.c4, D1.c5 ORDER BY D1.c2 ASC, D1.c4 ASC, D1.c5 ASC) as c7
    from
    (select D1.c1 as c1,
    D1.c2 as c2,
    D1.c3 as c3,
    D1.c4 as c4,
    D1.c5 as c5
    from
    (select sum(D1.c1) over (partition by D1.c2) as c1,
    D1.c2 as c2,
    sum(D1.c3) over (partition by D1.c5, D1.c2) as c3,
    D1.c4 as c4,
    D1.c5 as c5,
    ROW_NUMBER() OVER (PARTITION BY D1.c5 ORDER BY D1.c5 ASC) as c6
    from
    (select count(distinct T196.MASTER_CUSTOMER_KEY) as c1,
    T1365.REGION as c2,
    count(distinct T196.MASTER_CUSTOMER_KEY) as c3,
    T1365.COUNTRY_NAME as c4,
    T1365.COUNTRY_CODE as c5
    from
    GEOGRAPHIC_DIM T1365,
    SALES_FACT T196
    where ( T196.COUNTRY_CODE = T1365.COUNTRY_CODE )
    group by T1365.COUNTRY_CODE, T1365.COUNTRY_NAME, T1365.REGION
    ) D1
    ) D1
    where ( D1.c6 = 1 )
    ) D1,
    (select count(distinct T196.MASTER_CUSTOMER_KEY) as c1
    from
    SALES_FACT T196
    ) D2
    The Grand Total LBM shows the correct Data, the Region-LBM not.
    The Region-LBM is not calculated in a separate statement.
    I don't know why?

  • 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 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 ..

  • 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

  • Level Based Measure

    Hi,
    I have a situation, where I need to Push a metric in answers/ dashboard to RPD ( sum ( Dollars )/sum of ( Dollars by Month))
    My Fact table grain is Per month per account. I have a descreptive Field in fact table, ( Varchar(10) field) On which i need to get month level total, and %total for each description on in the RPD.
    I tried Creating degenerated Dim with fact table column, But i have lot of Cost on sql query. ( it is been running I did not see result so far :( (>5min ) I do not know even if I did in correct way.
    please help with any possible / easy way to handle this situation.
    and Please ask me if you need to know more on the issue. please help me.
    Thanks !!

    Hi Theleo,
    If I understand correctly, what you need here is a level based measure. My take on your requirement is as follows.
    1. Sum (Dollars) : This can be arrived at by simply using your measure. You might already have "Dollars" and the aggregation rule of "Sum" on it would do.
    2. Sum (Dollars by Month) :
         As per your description, the fact's grain is Month*Account. So, if you create a level based measure at [Month,Account] level, you would get sum[Dollars] for each account like "Account1"."Dollars", "Account2"."Dollars". However, you would like a sum of all these dollars for a particular month.
         So, instead go ahead and create a level based measure at the [parent to Account,Month] level.
         Say if your account hierarchy is like     Account Total-> Account, then level based measure at [Account Total, Month] is nothing but sum["Dollars"] by [Account1]+[Account2]+.... for a particular Month.
         You might have had no hierarchy in the Account dimension here, but still go ahead and create a logical hierarchy for the same in BMM(It helps and a best practice too ;))
    3. Sum(Dollars)/Sum(Dollars by Month) : Once you have a measure at step2, you can create another logical column for this calculation.
    I might not be pretty clear with the solution, but I hope you get it. Please do not hesitate to come back if you need any clarification.
    Hope this helps.
    Thank you,
    Dhar

  • 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

  • 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

  • RSUM and level based measure

    Hi all,
    Is it possible to use the RSUM display function with level based measure. RSUM(LBM) in Answers.
    I tried to do so but the RSUM is never correct,so i'm wondering if I'm doing something wrong or the RSUM is not working correctly with level based measures.
    Regards

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

  • 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

  • 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

  • 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

  • Issue Applying Level Based Measure

    Hi,
    I have a Product Table, and using properties on the table, I developed level based hierarchy(not manually).
    I also have a sales fact table, and partner table.
    I have multiple products, and for each product there are multiple partners.
    My requirement is to sum the top 10 partners revenue for a product divided by sum of revenue from all partners for that product.
    I duplicated the sales column and named as sales by product, when I mapped the sales by product column to product total, it is giving the sum of sales from all products.
    But I need sales for each product., when I mapped to the detail level It is drilling the sales by product to a detal level.
    Please help m how to map the sales by product column to product hierarchy.
    The columns in product table are...product key, product grp-id,product flag, product name( the column to which i need to map)
    My hierarchy in RPD is , product dimdim--product Toatl----Product deatil------all the columns in product.
    Thanks for all the help, Much Appreciated
    SR

    You can try this.. Create 2 logical columns..
    1, sum of revenue from all partners ==> Duplicate sales logical column and set the level for partner and Product.
    2, top 10 partners revenue for a product ==> Created another logical column and Use topn function and set the levels for product and partner at detail..

  • 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

  • Level Based Measure at Month level.

    Hi,
    I have defined a level based measure at "Month Level".
    I am expecting it have aggregate at month level within a year.
    But it is showing aggregation of month without regards to the year. For example in data of four years, for month of Aug it shows aggregation of Aug -2010, 2009, 2008 and 2007.
    How i can get Monthly aggregation at Month-Year level ?
    The time dimension and its hierarchy are based standard OWB time dimension.
    Thank you,
    ~ Ash

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

Maybe you are looking for