OBIEE - Calculated Measure and Row values.

Date Dimension = Dim Date
Location Dimension = Dim Unit
Fact Table = Fact Unit Svc Capacity
The image linked below illustrates my problem.
Combined screenshots
The top screenshot is from MS Excel and shows the expected data for May 2012. Columns: Civic Campus, Nursing Units(A1, A2 and A3), Average Daily Bed Quota and Monthly Bed Quota. Average Daily Bed Quota is derived from two columns: Bed Quota / Days of the Month. Monthly Bed Quota is derived from Bed Quota(with SUM aggregation). The calculated values shown are correct.
The second, third and fourth screenshots are from OBIEE Analytics for the same time index. Columns: Year(2012), Month(May), Campus(C), Nursing Unit(A1, A2 and A3), Average Daily Bed Quota and Monthly Bed Quota. The calculated values here should match the values in the Excel screenshot. Only the A1 Nursing Unit values match.
The fifth and final screenshot is from OBIEE Analytics for the same time index. The Days of Month column was added to the Compound Layout. In this screenshot, the Average Daily Bed Quota is being calculated correctly for each unit.
The Average Daily Bed Quota expression is only calculating Nursing Unit A1 correctly. I tried modifying the expression for my Days of Month logical column. In the alternate view, with Days of Month column, I can see the desired, calculated values. I'm not certain what is causing the error.
Edited by: 968521 on Oct 31, 2012 7:44 AM
Edited by: 968521 on Oct 31, 2012 7:46 AM

You need to have 'Is Prompted' for that specific measure. I would suggest to use action links on other columns instead of metrics.
Pls mark as correct/helpful if helps

Similar Messages

  • OBIEE- Calculating Min and Max Values

    Hi Friends,
    I have an Issue with regards to calculating Min/Max Values.
    In my Data base we dont have Message Count. So we created a Logical column in BMM Layer called "Message Count" based on the column "Out/In No" i.e by creating count of it i.e (Count(out/in no)) in BMM
    To calculate Inbound Messages we writing -- filter(Message count using messagetype ='i') at report level
    To calculate Outbound Messages we writing -- filter(Message count using messagetype ='o') at report Level
    To calculate Total Messages we writing----- "Message Count".
    But Now we had an issue to calculate "Min Inbound/Max Inbound/Min Outbound/Max Outbound/Avg In/Avg Out" types of Messages.
    To make it clear definition for MIN and MAx is Like This.
    Say Ravi received(Inbound) messages      2
    Say Roy received(Inbound) messages      5
    Say Kiran received(Inbound) messages   11 on a particular date.
    So for that particular date Min Inbound is 2
    So for that particular date Max Inbound is 11
    and Avg Inbound will be (2+5+11)/3
    On this basis we have to implement it in OBIEE. For any more clarifications please reply to my thread.
    Please reply to my Issue ASAP as it is critical and I am out of time.
    Thanks in Advance.
    Regards

    Hi,
    Do you mean to ask minimum stock in a plant and maximum stock in  a plant over a period of time?
    Due to receipts stocks flows in to the storage location of a plant. May be in one period there will be less stock or in one period there will be maximum stock.
    May be history tables like MBEWH or MARDH or the report MC.9 ( you need to provide the period as input) etc for your case.If this is  not your requirement please reply back.
    Regards

  • Doubt on calculating Hexadecimal and binary values

    Please give me some tips to find the hexadecimal and binary values of negative numbers for eg:-
    The hexadecimal value of -1 is 0xffffffff. Here I don't know how the corresponding hex value is calculated.
    I calculate the hex value of numbers in this way. For eg: to get the hex value 11
    1*16^1 + 1*16^0 = 17.
    Similar logic to convert binaries to decimal by using the base 10.

    It's about 2s complement arithmatic.
    Hexidecimal representation is used by people interested in the bit patterns, rather than numerical values as such so integers are treated as unsigned. But when working in decimal we're generally treating the variable as signed. Negative integers are represented by "adding" 2^32 to them so -1 becomes 2^32-1. This is stored as a word where all bits are 1s, which means in hex all nybles are 'F'.

  • Calculating min and max value from number array

    I have array which is having return type Number.i want to calculate min and max value of this array..try to help asap..
    Thanks
    dhanu

    hi there,
    public class MinMax {
         int arr[]= { 27, 3, 42, 18, 243, -43, 6, -8 };
         int min, max;
         public MinMax() {
    // it's very bad way to do it.
    //          min=99999;
    //          max=-99999;
    // this must be as following
                    min = max = arr[0];
              search();
              System.out.println("The minimum value is: "+min);
              System.out.println("The maximum value is: "+max);
         private void search() {
    // and here we can search from <1> index instead of <0>
              for (int j=1; j<arr.length; j++) {
                   if (arr[j]<min) {
                        min=arr[j];
                   else if (arr[j]>max) {
                        max=arr[j];
         public static void main(String args[]) {
              new MinMax();
    there is a bug in the supplied code. Your homework is
    to figure out what it is without posting another
    message for help with your homework.well, i think it's a tragedy :(

  • Group Totals and row values to be repeated

    All,
    I have a data set like this
    Category     YearMonth     Section      Count1      Count2
    Category1     201401           S1              15              
    5
    Category1     201401           S2              10              
    0
    Category1     201402           S1                5               5
    Below is the result set that I want:
    Category     YearMonth     Section     %Count2
    Category1     201401           S1               16.66% i.e. (5/30) * 100     (30, because if you
    look at YearMonth 201401, I want to have a sum of 15 + 5 + 10 ))
    Category1     201401           S2                (0/30) * 100 = 0%          
    Category1     201402           S1                (5/10) * 100 = 50% (Division by 10, coz the sum of counts for 201402 is 5 + 5)

    Hi SqlCraze,
    According to your description, you want to calculate a percentage of Count1 in Total Counts. Right?
    In this scenario, we can set the detail rows group on YearMonth. Since we can specify scope for sum function, so we can get the total counts value for each group and calculate the percentage. please try the following expression:
    =Fields!Count2.Value/(Sum(Fields!Count1.Value,"YearMonth")+Sum(Fields!Count2.Value,"YearMonth"))
    We have tested this scenario, the design and result look like below:
    Reference:
    Sum Function (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Calculations with measures and values

    Hi,
    I have an other problem.
    I have a calculated measure and I have a value which doesn't chance - both of them refere to same subject . I have to do a simple subtraction. But the tricky part is that the one value has to change but it doesn't. so my calculations are wrong.
    Example:
    Date -- Project -- Employee -- Days Worked on Project so far -- Days available
    Apr 2011 -- XY -- Mr.Z -- 17 Days -- 45 Days
    Mai 2011 -- XY -- Mr.Z -- 20 Days -- 45 Days
    Jun 2011 -- XY -- Mr.z -- 5 Days -- 45 Days
    I want to calculate how much days are left -> 45 Day available minus (April 2011) 17 Day = 28 Days Left and so on.
    Date -- Project -- Employee -- Days Worked on Project so far -- Days available -- Days left ---> my results for Days left
    Apr 2011 -- XY -- Mr.Z -- 17 Days -- 45 Days -- 28 Days ---> 28 Days
    Mai 2011 -- XY -- Mr.Z -- 20 Days -- 45 Days -- 8 Days ---> 25 Days
    Jun 2011 -- XY -- Mr.z -- 5 Days -- 45 Days -- 3 Days ---> 40 Days
    thanks in advance
    Edited by: Backlit on 14.07.2011 02:47

    Hi, try doing this
    make a column 'rtotal' which calculates the running total for 'Days worked on project so far' and then in days left column use the formula days available-rtotal.
    not sure if it will work, dont have the data set to test it.
    see these links to calculate running total
    http://gerardnico.com/wiki/dat/obiee/running_total
    http://gerardnico.com/wiki/dat/obiee/group_by

  • How to use dynamic set in calculated measure

    Hi, 
    I have this calculated measure in my cube:
    member [Measures].[Estimate]
    as 
    iif(
    isleaf([Calendar].[By Year - Quarter - Month].currentmember),
    iif(
    1=1, // Simplified for examples sake
    [Measures].[Actual],
    [Measures].[Budget]
    sum(
    [Calendar].[By Year - Quarter - Month].currentmember.children,
    [Measures].[Estimate]
    It works fine, however when the user filters on the calendar hierarchy, the totals does not seem to react. As far as I can read, this is related the use of sub cubes when filtering in Excel, and this can be fixed by using a dynamic set, but how? I am unsure
    how one would use it with this measure.
    Thanks in advance

    This used to be a problem with Excel 2003 though I thought it had been fixed with the more recent versions. I've only seen this issue when using named sets in a calculated measure and not when the set is defined within the calculated measure and that's corrected
    by declaring EXISTING before the named set reference as below.
    SET [Member Descendants] AS
    [Calendar].[By Year - Quarter - Month].CurrentMember.CHILDREN
    MEMBER [Measures].[Estimate] AS
    IIF(
    ISLEAF([Calendar].[By Year - Quarter - Month].currentmember),
    IIF(
    1=1, // Simplified for examples sake
    [Measures].[Actual],
    [Measures].[Budget]
    SUM(
    EXISTING [Member Descendants],
    [Measures].[Estimate]
    EXISTING will force the named set to be evaluated with the context of each cell evaluation.
    Martin Mason Wordpress Blog

  • New calculated member based on existing measure and a dimension value

    Hi
    I’m trying to create a new calculated member in my cube based on an existing measure and a dimension value.
    I can do it easily in DSW but I want to do it as a Calculated Member in Calculations tab from my cube.
    I have a dimension called Product in which one attribute is UOM (unit of measure) and a measure called Quantity. The relationship with the fact table is “Regular”.
    For each product we have a unit of measure and an associated quantity measure:
    Product Name   
    UOM     Quantity
    Product 1   
              Km  
             50
    Product 2   
              Kg   
             60
    Product 3   
              Kw 
              25
    Product 4              L               
    15
    Product 5              T     
             1.5
    Total                                     151.5
    The calculated member I want to create is “Kw” and has to contain the value from Quantity measure when Product.UOM is “kW” and should look like this:
    Product Name   
    UOM     Quantity   
    Kw
    Product 1   
              Km  
             50           
    Product 2   
              Kg   
             60
    Product 3   
              Kw 
              25           
     25
    Product 4              L  
                 15
    Product 5              T     
             1.5
    Total                                     151.5        
    25
    So far I tried using the MDX with “IIF” or “Case” but with no results.
    What statement I should use in this case?
    Thank you.

    Hi Cees,
    Thank you for your answer.
    I never used yet the “Scope” statement and yet it’s an elegant solution.
    I use it as in your example:
    CREATE
    MEMBER CURRENTCUBE.[Measures].[Kw]
    AS NULL,
    FORMAT_STRING =
    VISIBLE = 1 , 
    ASSOCIATED_MEASURE_GROUP =
    'TR Other';
    Scope [Measures].[Kw];
     Scope [Product].[UOM].[kW];
     This = [Measures].[Quantity];
     End
    Scope;
    End
    Scope;
    …and the calculations are solid…with one exception: when I took out UOM from the query there are no more any resuts:
    Product Name    Quantity    Kw
    Total      
    It’s only working
    if using UOM in the query.                         
    I also thought that a
    tulpe might be another solution as:
    ([Measures].[Quantity],[Product].[UOM].&[kW])
    On this last one I’ve got the expected results with one exception: when I use UOM in the query all the other UOM values are listed each one of them
    having the [Kw] measure calculation value.
    Product Name    UOM     Quantity    Kw
    Product 1              Km  
             50           
    Product 2              Kg   
             60
    Product 3              Km 
              25             25
    Product 3              Kg 
               25             25
    Product 3              Kw 
              25             25
    Product 3              L 
    25              25
    Product 3              T 
    25           
      25
    Product 4              L  
                15
    Product 5              T     
             1.5
    Total                                     151.5        
    25
    …and without UOM in the query I have what I’m expected:
    Product Name    Quantity   
    Kw
    Product 1              50           
    Product 2              60
    Product 3               25           
     25
    Product 4              
    15
    Product 5             
     1.5
    Total                       151.5        
    25
     Maybe we can work together to find a solution.
    Thank you,
    Oks

  • How to create calculation as a percentage of a row value

    How do I create this calculation in OBIEE? It seems simple but I can't get the right results.
    Let's say I have a field called Account with the following values:
    Sales - 1000
    Product Cost - 300
    Operating Supplies - 100
    Returns - 100
    Fixed Costs - 300
    I need to create a column that would be percentage of Sales. So my report would now show:
    Sales - 100%
    Product Cost - 30%
    Operating Supplies - 10%
    Returns - 10%
    Fixed Costs - 30%
    How do I do this? It's very easy for me to create a percentage of total calculation, but I can't create a percentage of a specific row.

    Hi,
    Sales, Product Cost, etc are row values for Accountthis is where your complexity come in.
    if those are individual measure labels then it would've been easy to achieve.
    But, still can do one thing.
    report split into two views: one will show normal values, other will be % side by side in compound layout.
    1. create those many columns in criteria using filter() function, and name it as Sales, Product Cost
    ex: for Product Cost heading column fx will b: 100*filter(Amount using Account = 'Product Cost')/filter(Amount using Account = 'Product Cost')
    2. now, in pivot 2-> use each column as measures and add those many into measures part of pivot.
    3. Drag Measure Labels to Rows part.
    4. Add both the views to compound layout side by side.
    (i'm assuming that we need to show actual and % values in report, if not you need not to go for pivot1, simply one pivot with above logic)
    but it has got limitation like: if Account column is populated with one more value tomorrow.. it'll be a problem..

  • Measures as Rows in Pivot Table? OBIEE 11g

    Hi,
    Is it possible to show measures as rows and attributes as columns? I have only one value in my attribute columns.
    example:
    --------Company(Oracle)-----Country(India)
    Sales        100                  20000
    Units         50                  40000Thanks in advance.

    869650 wrote:
    Hi,
    Is it possible to show measures as rows and attributes as columns? I have only one value in my attribute columns.
    example:
    --------Company(Oracle)-----Country(India)
    Sales        100                  20000
    Units         50                  40000Thanks in advance.In the pivot table, you have a column for Rows, Columns, and Measures.
    Try this:
    Put the Measure Labels in the Rows section, the Company column in the Columns section, and your Measures in the Measures section.

  • How to use row values in Presentation or Administration for calculation

    Hi All,
    I am working on OBIEE, I want to calculate / or % on two rows.
    e.g. In my report row 3 is value 20 and row 5 is value 200.
    In same column row 6 I want to display *(row 5 / row 3 )* 200/ 20 i.e. output should be 10.
    Else can I use variable to and assign value to variable.
    I tried but giving error :
    CASE
    WHEN "Report Structure".Seq = 101 and Currency.Code = 'SAR' THEN
    "Fact Report"."Actual PTD" ,
    VALUEOF("col10") = "Fact Report"."Actual PTD"
    ELSE "Fact Report"."Actual PTD"
    END
    I am trying to store row value to repository variable to solve above problem.
    My question is how to assign value to variable.
    Please guide me to solve this problem.
    Thanks In advance
    Regards
    Dixit

    When you want to compare two row values, you can use the lag and lead analytical function of oracle.
    lag and lead are analytical functions that can be used to get the value of a column in a previous/next row.
    I have made just an example on my blog for a period to period comparison on OBIEE
    http://gerardnico.com/weblog/2009/04/17/obiee-period-to-period-comparison-with-the-analytical-function-laglead/
    And if you want an example on Oracle :
    http://gerardnico.com/wiki/dw/analytic_function/analytic_function_lag
    But I don't understand completely your problem. What about the row 1, 2, 4 ? I don't really see you report.
    What I see, is that you have a problem with the currency.
    You say :
    I am trying to store row value to repository variable to solve above problem.For me, it's not possible...
    Success
    Nico

  • Display rows for empty and mesure values

    Hi,
    We are building live office objects charts on top of WEBI documents and facing an issue while refreshing the data in live office object for empty measure and empty dimension values. Charts are pointed to the data cells in the live office table and if there is no data for the given selections for any measure or dimension the data cell range will change and charts are not working properly. So, we want show the measures as zero and show rows with empty dimension values even if the data doesnu2019t exists.
    I believe we should have some setting in WEBI or live office. Would be appreciated your help.
    Best Regards,
    Satya

    To get zero : Change the measure object formula
    To get empty rows: Check "Show dimensions with empty rows and columns and rows/columns" all three options.
    Hope this will helps you...!!
    Thank You.

  • OBIEE 11g - zeros and nulls and rows, oh my!

    Hi, dumb question here, but I need some help with handling zeros and nulls with OBIEE.
    First off, I have a fact table that contains five "metrics" - A, B, C, D, and E. Often (but not always), only 1 of the 5 columns is populated, the others are NULL.
    In the RPD, I've brought in these 5 columns and set their aggregation to SUM. In addition, I've created other calculated metrics such as F = A+B, G = A+C+E, etc. To get these calculations to work right, I seem to have to use IfNull(metric,0) often, because apparently NULL plus a number equals NULL.
    From a usability standpoint, here's what I'm seeing on reports that I don't like (for instance, imagine the particular report is displaying columns A, B, and F only)
    #1 - If A and B are both NULL, the F column always shows as a 0 because the formula is IfNull(A,0) + IfNull(B,0). It would be nice if I could get F to also show NULL, without making the formula complicated
    #2 - Rows are showing on the report where everything on the row is either NULL or 0. I assume this is because one of the columns not being displayed has numbers in it. Is there a way to get OBIEE to not show rows that have all zeros or NULLs? Or is this due to the fact that the IfNull(A,0) + IfNull(B,0) is returning a non-NULL answer...and if I modified the formula so it did return a NULL it would magically go away?
    Thanks!
    Scott

    p.s. regarding issue #2...I suppose I could put a filter on to filter out rows with all zeros or NULLs, but this filter gets uglier and uglier as the number of columns grows...and I wouldn't want developers to have to do this.
    Thx,
    Scott

  • Webi - Multiply row values and aggregate

    Hi,
    I am trying to do some report level calculation in which I need to multiple two measures and then aggregate the values.
    Here is an example:
    Region     City     Unit Price     Qty Sold     Rev
    A     C1     10     2     20
    A     C2     20     3     60
    C     C2     30     4     120
                        200
    Table above has Unit price & Qty sold for each region and city.
    I calculated Rev by Unit price * Qty sold, and also got sum of rev as 200.
    But when I try to show the Rev at region level I dont get the right figures:
    Region     What I need     What I get
    A     80     150
    C     120     120
         200     270
    For Region A I shd get 80 ((102)+(203)) and not 150 (30*5).
    can someone provide suggestions to get this to work...
    I've tried using some context but no luck so far..

    Use the formula below for revenue:
    Sum(([Unit Price]*[Qty Sold]) ForEach ([Region];[City]))
    Make sure you have both region and city dimensions in webi query.

  • Calculating sum of a value for subset of rows

    I have a dataset. I want to add a calculated measure that gives the total cost for each set of rows grouped by CaseID. An example below shows the table layout, and the "Total Case Cost" column is the one i am trying to calculate. Can someone point
    me in the right direction with the Dax? Ive tried using SUMMARIZE but cant get it to work:
    CaseID
    TestCode
    BatchCode
    TestCost
    Total Case Cost
    A001
    A1
    A
    20
    65
    A001
    A1
    B
    20
    65
    A001
    A2
    A
    15
    65
    A001
    A3
    A
    10
    65
    A002
    B4
    A
    50
    70
    A002
    B5
    A
    20
    70
    Thanks!

    Found my solution myself, in case it helps anyone, here it is:
    Total Cost Per Case:=CALCULATE(SUM([TesCcost]),ALLEXCEPT(TableName, Detail[CaseID]))

Maybe you are looking for