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

Similar Messages

  • Mapping the Fact table to different levels of a dimension

    Hi,
    I have a fact table which stores the data for 4 levels of the dimensions. The aggregation method was taken care by PL/SQL and the fact table will have the data for all the 4 levels. When im trying to map all the levels to a column in the fact table using the OEM, it is generating the F KEY constraints referncing the columns mapped for the various levels of the dimension.
    The problem is that im using a denormalised table for maintaing the values of the dimension. So the columns mapped for the levels(Except for the lowest) can't have the unique key defined on it. The cube is not getting created because of the error in creating the F KEY.
    Can u please suggest how to map this fact table.
    Thnks,
    Manohar Vanama

    I am not exactly clear on your schema but I believe you are trying to map tables which are not strict star or snowflake. This means that you cannot use CWM1 (and OEM), unless you change the structure of the tables. You might be able to map the tables with CWM2. The document below will assist you:
    Oracle9i OLAP User's Guide
    Chapter 4. Designing Your Database for OLAP
    Chapter 5. Creating OLAP Catalog Metadata

  • 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 aggregations at different levels

    When I view the data using 'Measure Data Viewer', the items in a dimension are showing in random order.
    How do I load the data in a dimension in ascending order so I can view it in ascending order.
    Also, is it possible to apply different aggregations at different levels in a dimension?
    Thanks.

    Thank you. I will put different measures with different dimensions in different cubes.
    After I mapped my measures in the mapping canvas(I can see the mapping lines), I tried to maintain the measure. But I am getting an error 'some-measure-name may not be maintained since mapping do not exist for the measure'.
    I am using AWM 10.2.0.3A and the database is 10.2.0.4
    Thanks

  • One Dimension with Facts at different levels

    I currently have a single dimension with 5 levels. I have two fact tables that both connect to the dimension table but at different levels.
    For example. If we have a Dimension Country -> Region -> City and then two fact tables. One that has facts at the Region level and one that has facts at the City level.
    Is there a way to be able to have an answer that contains facts from both fact tables. So if there was a fact from City and the Region level? Everything I seem to try does not work. Would I have to create an additional aggregate table that aggregates the City level data up to the Region? Or is there a way to show the data at the lowest level and show either nulls or duplicate values for the additional records.
    Any help is greatly appreciated

    This has helped a little. I am now getting values from both levels. However, because i am summing the two values. The value from the upper level is now summing duplicate values. For example.
    Value 1 on its own
    Level1 Level 2 Level 3 Value 1
    1234 10 10 13.05
    1234 20 10 70.00
    1234 20 20 70.00
    1234 30 10 105.00
    1234 30 20 105.00
    Value 2 on its own
    Level1 Level 2 Level 3 Value 2
    1234 10 10 0.50
    1234 20 10 2.00
    1234 20 20 2.00
    1234 30 10 3.00
    1234 30 20 3.00
    What I am getting
    Level1 Level 2 Level 3 Value 1 Value 2
    1234 10 10 13.05 0.50
    1234 20 10 140.00 2.00
    1234 20 20 140.00 2.00
    1234 30 10 210.00 3.00
    1234 30 20 210.00 3.00
    Desired Outcome
    Level1 Level 2 Level 3 Value 1 Value 2
    1234 10 10 13.05 0.50
    1234 20 10 70.00 2.00
    1234 20 20 70.00 2.00
    1234 30 10 105.00 3.00
    1234 30 20 105.00 3.00
    Now, the problem with this is that Value 1 is a fact at Level 2 and Value 2 is a fact at Level 3. I have one dimension table and two fact tables. The join between the fact table for Value two and the dimension table is the same as the join between the dimension table and Value 1 only it is missing the last level of detail.
    I have then set the logical table source content tabs for each fact table to the corresponding levels.
    I thought this would be enough but i still don't get the desired result. I am not sure if this is possible with one dimension table.
    Any ideas would be greatly appreciated.
    Edited by: user10800227 on Jan 11, 2010 12:43 PM

  • Display different level for same hierarchy value in BO 4.0

    Hi Expert,
    I have one question for Webi for BO 4.0
    We have one hierarchy in BW side and we hope to display differet level in same report for different column
    For example, column A is for level 6. column B is for level 7.
    Do you know how to releaze this in Webi side?
    In the 3.X version, we have different dimension for different level.
    But now in BO 4, it has been combined into one\
    Thanks and best regards
    Alex yang

    Hi,
    You can still do this in BI 4.0, if you use the old 'legacy'  MDX OLAP.unv from Universe Designer tool .
    Yes, with the BICS connection,  you are getting a native hierarchy, as it would be displayed in an OLAP environment.
    Cheers,
    H

  • OBIEE report from multiple facts at different levels

    Currently we need to develop a report with columns from 3 different facts surrounded with conformed and non conformed dimensions at different levels.
    After setting the hierarchial levels and putting the facts into single logical table with different sources OBIEE is generating 2 different queries and does a full outer join.
    I would like to know how we can do a left outer join instead of full outer join between the 2 queries based on a common column?
    Thanks in advance.

    Hi Vinod,
    The scenario provided in the link above doesnt match to my issue.
    We need to develop a report from multiple fact tables at different levels with conformed & non conformed dimension columns.
    I have 7 dimensions D1, D2, D3, D4, D5, D6 and D7 & two fact F1 and F2 tables.
    F1 is tied to dimensions D1,D2,D3,D4,d5
    F2 is tied to dimensions D3,D4,D5, D6 and D7.
    In my report I have columns from D1, D2, D3, D4, D5, D6, D7, F1 and F2.
    So OBIEE generates 2 queries with columns from D1,D2,D3,D4,d5 & F1 measure and another query with D3,D4,D5, D6, D7 and F2 measure.
    and then does a cross fact join out of box between 2 queries.
    But I need to do a left outer join between the 2 queries on a common column instead of cross fact join. I would like to know how we can achive this.
    Thanks.

  • How to sort two different hierarchies in one dimension

    Does anyone know of a way to sort two different hierarchies in one dimension and still make drilling work correctly? We have two hierarchies in our item dimension; one called category and the other origin. Simplified, it looks like this:
    CATEGORY
    Hardware (100)
    ..PCs (100.100)
    ....PC 1
    ....PC 2
    ....PC 3
    ..Monitors (100.200)
    ....Monitor 1
    ....Monitor 2
    ....Monitor 3
    Software (200)
    ..Big (200.100)
    ....ERP package
    ....CRM package
    ..Small (200.200)
    ....Solitaire
    ....Mine Sweeper
    ORIGIN
    Vendor A (10)
    ..Site A1 (10.10)
    ....ERP package
    ..Site A2 (10.20)
    ....PC 1
    ....Monitor 3
    Vendor B (20)
    ..Site B1 (20.10)
    ....PC 2
    ....PC 3
    ....Monitor 1
    ....Monitor 2
    ....Solitaire
    ....Mine Sweeper
    ..Site B2 (20.20)
    ....CRM package
    We have numeric codes at each level above item which I represents the sort order (the number in parentheses at each level), and the items themselves should be sorted according to item number. I have implemented this (level code/item number) as an attribute in AWM making this the default sort order. However, as item is the lowest level in each hierarchy, I have only been able to list the items under the correct level in one hierarchy. As soon as I drill using the other hierarchy, the levels above item are sorted correctly, but the items appear at very odd places...
    The AWM documentation states that if default order is not selected on any attribute, hierarchies are sorted in the order they are created. Is there a way to control this order?
    Any input will be greatly appreciated!

    Hi,
    thank you for your answer. Yes, now I also find the class CL_SALV_WD_MULTI_CELL_EDITOR which could be used to set different UIE in one cell. But it is quite limited, just the following UIE could be used
    - LinkToAction 
    - LinkToURL    
    - FileDownload 
    - Button       
    - ToggleButton 
    best regards,
    Wenwen

  • Essbase cubes with different levels of detail - OBIEE 10.1.3.4.1 on LINUX

    Hi all,
    I have BSO and ASO cubes which contain broadly the same information, but with the ASO cube at much higher detail. For simplicity sake, they only have 1 dimension, and 1 fact. The dimension a date and is structured like:
    Gen2 = year
    Gen3 = year & quarter
    Gen4 = year & month
    Gen5 = year, month & day
    Only the ASO cube has Gen5. the BSO cube only has the information to Gen4 level.
    I've imported them both into the RPD and dragged the ASO cube across into the BMM. and then taken the fact column from the BSO cube and dropped it onto the BMM, selected its new source ( the BSO cube ) and set the
    Content tab and set the logical level as Gen4.
    I then dragged the key items from the BSO date hierachy onto the date dimension in the BMM.
    I purposely had a slightly different date hierachy and data content in the 2 cubes so I could tell where it was getting the data from.
    If I select the year only...it gets the value from the BSO, and if I drill down to quarter and month it also gets the dates from the BSO cube.
    If I select the data fact, it will switch to the ASO cube and retrieve the value from there.
    Same applies if I select just the year - data comes in from the ASO cube.
    So my question is this, how do I get it to select the data facts from the less detailed cube when the details is not required and only switch to the ASO cube when the extra detail is needed?
    Thanks in advance for any assistance

    Anyone have any thoughts on this?
    Data fact with 2 sources, where source 1 & 2 have differing levels of detail, it always seems to take the data from the more detailed source

  • OBIEE Facts at different levels.

    Hi,
    I am bringing columns from three tables: Two facts and one Dimension table to create a OBIEE Report.
    The fact tables Workforce Event Fact and Employee Daily Snap Fact are at different levels, but both of them have proper joins with Dimension Employee Dim.
    When i am pulling columns from D1 and any one of these two facts, i am not facing any problem in seeing results. But when i bring columns from all of these three tables, i am getting this error,
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table Workforce Event Fact) does not contain mapping for [Employee Daily Snap Fact.Exempt Indicator]. (HY000)
    Is there anything i have to do in Business Model layer to avoid this error. Many people suggesting to assign an aggregation level for these two facts. But i am not having any Dimensional Hierarchy defined.
    Thanks
    Swami

    Hi swami,
    Many people suggesting to assign an aggregation level for these two factsThis is a workaround i think where you need to create aggregate tables(not levels) and then use them for your purpose.(OR) you dint define the logical source table properly either correct it.
    Another work around i could suggest is,take the 2 fact tables columns needed into one alias table and make it as fact and join this fact table to dimension table and you can get all columns.
    Hope it helps you.
    Best Wishes,
    Kranthi.

  • Nesting of AGO or TODATE functions with differing level arguments is not supported

    I have a column in BMM which calculates the Year-To-Date Sales. This function uses the ToDate function to caculate the YTD.
    I need to develop another formula column which shows the last-year's YTD.
    I develop this formula in BMM by AGO on the YTD column which already uses a ToDate function.
    In BI Answers when selecting this column, results in the below message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 22044] Nesting of AGO or TODATE functions with differing level arguments is not supported. (HY000)

    To reply to my own question. It appears I got it working, that is, the error message problem is solved, but I still have questions on how to use these functions.
    To get it to work, I added the primary key D_TIJD.TIJDKEY at the level of the lowest grain in my dimension (level tab).
    What I still wonder is how to make it select the right values. I have the following hierarchy: bookyear - bookperiod - week. A bookperiod contains 4 or 5 weeks (4,4,5 in a quarter), so 12 periods in one year. I defined a measure at period level and another at that level with the ago function, that should return the figures for that same period of the year before. My first question is, whether to go back 12 periods or 52 weeks (which is the lowest grain in my dimension)?
    The second question is how to use a combination of TODATE and AGO so that if I calculate the current period (of which only 2 weeks are passed), I also only want to include the same two weeks for that period one year ago in order to make a correct comparison. How do I do that???

  • Multiplying data at two different levels

    I have Actual Forecast Bias data generated at a particular level (%Bias). I want to multiply this against other data that is at a different level in the same cube so as to adjust the forecast in line with actual performance. The Bias% data is at Battery Part# level. The data that I want to multiply it against is Appliance/Battery level. When I run it, the multiplication operates against a rolled up consumption level for all appliances that use a particular battery. I need the Bias % to operate at the battery level, not the rolled up level..
    I'm a newbi at this so any help welcome
    See the code below
    FIX (Batteries, @IDESCENDANTS ("A Size Family"),appliances,ww,@idescendants(NA));
    "New forecast %" = #Missing;
    "Bias %" = #Missing;
    "Bias %" = ("trade units" -> Actual/"trade units");
    ENDFIX;
    FIX("wif 1")
    FIX (@LEVMBRS(appliances,1),@levmbrs(Batteries,0), @IDESCENDANTS ("A Size Family"),ww,@idescendants(NA));
    "New forecast %" = consumption*"Bias %";
    ENDFIX;
    ENDFIX;
    FIX("wif 1")
    CALC DIM (WW, Supplies, Printers);
    ENDFIX;

    Hi Johnnie
    I assume the important bit is the bit within the second fix:
    "New Forecast" = Consumption * "Bias %";
    The way you have your fix statement set up it is looking at level 0 members in your Appliances and Batteries dimensions (I'm reading your post as if they are separate dimensions). I assume your issue is that the one piece of data is at level 0 interesections of appliances and batteries but the other piece is not possibly at level 0 of one dimension and level 1 or higher of the other, Bias% being the one at the higher level?
    If that is the case then I think you need to look at a way of getting from the level 0 member to the correct intersection point(s).
    Have you had a look through the technical reference at functions like @PARENTVAL, @ANCESTVAL or the multidimensional options for the same @MDPARENTVAL and @MDANCESTVAL, it sounds like your formula needs to be something along the following lines
    "New Forecast" = Consumption * @PARENTVAL(Appliances, "Bias%");
    What the above would do differently to your original code would be to get the Bias % value from the parent of the current level 0 member of the appliance dimension being calculated. While this might not be exactly what your requirement is hopefully it will steer you in the right direction.
    Hope this helps
    Stuart

  • Naming of top level in a dimension

    Hi,
    I was wondering if the naming of the top level in a dimension. Earlier I have just named the top levels whatever suited me the best, and haven't had any problems with that. A couple of days ago I came a across an article on Mark Rittmans weblog where it said that Discoverer and BI beans expect a total level.
    Should all the top levels be named total_***** ?
    What is the consequence of not naming them total_****?
    Anyone have any thoughts on this?
    Regards Ragnar

    Level names can be reused across dimensions. This is common. For example, detail level data is very often shared across levels. When is comes to summary levels, you need decide whether this makes sense. Consider two hierarchies:
    Shipping Hierarchy, with levels:
    Total Product
    Region Shipments
    Country Shipments
    Warehouse
    Item
    Product Type hierarchy, with levels:
    Total Product
    Brand
    Group
    Item
    In the above case, Total Product in each hierarchy should yield the same values because it is the aggregation of all items. So, you might decide that is ok. A different case might not be ok. Consider:
    Shipping Hierarchy, with levels:
    Total Product
    Region Shipments
    Country Shipments
    Warehouse
    Items shipped
    Product Type hierarchy, with levels:
    Total Product
    Brand
    Group
    Items sold
    Since Items Shipped and Items Sold are likely to have different values, the aggregation of each level will yield a different value. In this case, Total Product as the top of each hierarchy doesn't make sense.
    A different twist would be (note the display names):
    Shipping Hierarchy, with levels:
    Total Shipments with 'Total Product' as display name
    Region Shipments
    Country Shipments
    Warehouse
    Items shipped
    Product Type hierarchy, with levels:
    Total Product Types with 'Total Product' as display name
    Brand
    Group
    Items sold
    In this case there will be different levels with different values, but the user will see each as 'Total Product'. Only your user community can tell you if this is want they want.

  • Substract as an aggregation rule for different level in a DIM ?!

    Hi there..
    I'm building a BI model based on financial transactions (incomes, expenses, etc..)
    and my main problem is how to substract a measure, where the aggregation rule is set to SUM, for different levels in the "Account" dimension?
    Example:
    I have the "Account" dimension with the following hierarchy:
    Account_ID / Account_name / Account_type / Account_total
    And, lets say, 2 rows in it:
    1.row in the "Account" dimension:
    account_ID : 100
    account_name : "Marketing expense"
    account_type : "Variable expenses"
    account_total : "Total profit" (total income - total Expenses)
    2. row in the "Account" dimension:
    account_ID : 200
    account_name : "Financial incomes"
    account_type : "Total incomes"
    account_total : "Total profit" (total income - total Expenses)
    "Total profit"
    "Tot. incomes" "Tot. Expenses"
    "Finan. incomes" "Market. expenses"
    The fact table has just one measure: "Amount" and, of course, some foreign keys:
    Account_ID -> "Account" dim
    Organization_ID -> "Organization" dim
    Date -> "Date" dim
    Amount
    The measure "Amount" in the fact table is positive both for expenses and incomes.
    Now, what I'm trying to do is to sum up that measure on my top level in the "Account" dim.
    At that level my report in Answers should substract "Total expenses" from "Total incomes"!
    How can I do that?
    thanks..
    Ivan

    Sorry to pop the obvious question, but can't you model that nicely and put it into distinct columns?
    If not, you can create derived measures on you fact using "case when" statements. One for the incomes with amount > 0 (or >=0 ...depends on where you want to have the 0's) and one for the expenses with amount < 0.
    HTH,
    Chris

  • Can I map different levels of a hierarchy to different sources

    Hi,
    I want for AWM not to aggregate the upper levels of a dimension by itself. Instead, i want to feed the data for upper levels also through different sources.
    Its becauese, the measure values of my dimension can not be aggregated from lower level. The value has to be calculated separetely.
    I know that the AWM will not aggregate when i specify the dimension agg rule as 'NON ADDATIVE' or something like that. I did it and i was done too. There were the data only for base level for that particular dimension. The other levels were empty.
    Now i want to feed the data for other empty levels from different source.
    Does anyone knows if it is possible in AWM 10.2.0.1 or can i do it from any other way?
    If one knows how to do it, i would be very much grateful to know it clearly.
    with regards,
    subash

    The following method assumes that you are assuming responsibility for managing all of the aggregate level data on your own:
    1. Define the cube as (a) uncompressed (the aggregate space of a compressed cube is always managed by the multidimensional engine), (b) with aggregation methods of SUM for all dimensions and (c) with only the detail levels selected on the 'Summarize To' tab of the cube definition. This will set up the cube so that it will not aggregate data when it is loaded.
    You will have a formula used to represent the measure and it will look something like this:
    DEFINE SALES_CUBE_SALES FORMULA DECIMAL <TIME CHANNEL CUSTOMER PRODUCT>
    EQ aggregate(this_aw!SALES_CUBE_SALES_STORED using this_aw!OBJ1819687276)
    You can see from the AGGREGATE command in the formula that it is set up to aggregate data at runtime if necessary. The formula reads from a variable that will look something like this:
    DEFINE SALES_CUBE_SALES_STORED VARIABLE DECIMAL WITH AGGCOUNT <SALES_CUBE_PARTITION_TEMPLATE <TIME CHANNEL CUSTOMER PRODUCT>>
    2. Load the data. You can load the base data through AWM if you wish or you can load it into the variable of the measure using OLAP DML code. You cannot map tables to summary levels using AWM, so you will need to use OLAP DML code to do this. An example program follows.
    DEFINE LOAD_SALES PROGRAM INTEGER
    PROGRAM
    vrb _errortext text
    trap on HADERROR noprint
    sql declare c1 cursor for -
    select -
    to_char(MONTH_ID), -
    to_char(ITEM_ID), -
    to_char(SHIP_TO_ID), -
    to_char(CHANNEL_ID), -
    SALES -
    from GLOBAL.SALES_FACT -
    where -
    (MONTH_ID IS NOT NULL) and -
    (ITEM_ID IS NOT NULL) and -
    (SHIP_TO_ID IS NOT NULL) and -
    (CHANNEL_ID IS NOT NULL) -
    order by -
    CHANNEL_ID, -
    SHIP_TO_ID, -
    ITEM_ID, -
    MONTH_ID
    sql open c1
    if sqlcode ne 0
    then do
    _errortext =  SQLERRM
    goto HADERROR
    doend
    sql import c1 into -
    :MATCHSKIPERR TIME_MONTH -
    :MATCHSKIPERR PRODUCT -
    :MATCHSKIPERR CUSTOMER -
    :MATCHSKIPERR CHANNEL -
    :UNITS_CUBE_PRT_TOPVAR(UNITS_CUBE_PRT_MEASDIM 'SALES')
    if sqlcode lt 0
    then do
    _errortext =  SQLERRM
    goto HADERROR
    doend
    sql close c1
    sql cleanup
    return 0
    HADERROR:
    trap on NO_ERROR noprint
    sql close c1
    NO_ERROR:
    trap off
    sql cleanup
    END
    3. Change the formula of the measure so that it does not aggregate using OLAP DML commands. E.g.,
    consider sales_cube_sales
    eq SALES_CUBE_SALES_STORED
    The formula will then simply get data from the variable rather than call the aggregate system.
    Since you are writing to the physical implementation of the AW you will need to check this code each time you upgrade the database because the physical implementation changes from time to time. (Usually major releases such as 10.1 and 10.2, not usually maintenance releases, but you never know.)

Maybe you are looking for