Using dimension values in calculations of cubes

hi ,
I am trying to build a calculated measure using a dimension values like for example
if a dimension is portfolio
having values L,X and C values
and the calculated metrics is like to be calculated only for L and for others it should show 0.
I created something like this
sum({[Portfolio Cd].[Portfolio Cd].&[L]},[Measures].[Annual Intr Amt Pl L])
the problem is that when this metric is drawn to check the values against this dimension it show same values for all the portfolios
where as it should show 0 for  X and C .
Can anybody suggest a solution to this .?
thanks in advance

Hi,
  Try using a CASE statement in your Calculated measure as shown in below sample
WITH MEMBER MEasures.SalesAmount
as
CASE
WHEN [Product].[Category].CURRENTMEMBER.MEMBER_CAPTION = "Accessories" THEN SUM([Measures].[Internet Sales Amount])
ELSE 0
END
SELECT [Product].[Category].[Category] ON 1
,MEasures.SalesAmount ON 0
FROM [Adventure Works]
Best Regards Sorna

Similar Messages

  • Execution of a planning function with the used dimension values in a crosstab

    Hello,
    would like to execute planning functions within Design Studio but I don't really know how I combine this execution with the used dimension values in a crosstab for the .
    Here the requirement:
    3 Planning functions which should use the same filter (all values of all dimensions in the crosstab) and which should run one after another:
    // open data slice
    PF_1.execute();
    // generate combinitions
    PF_2.execute();
    // close data slice
    PF_3.execute();
    Many thanks in advance.
    Kind regards,
    Tobias

    Hi Arun,
    in general it is not possible to nest planning functions. The inner function would update the data in the plan buffer without the outer function knowing about it. Also the inner function might be on a different aggregation level which would make things very tricky.
    Alternatively you can include ABAP logic into a FOX formula:
    http://help.sap.com/saphelp_nw70/helpdata/en/47/94eb78b6394befe10000000a42189d/frameset.htm
    Or just create the complete logic in one ABAP planning function type.
    Regards,
    Marc
    SAP NetWeaver RIG

  • Logical column - Fact measure using Dimension value

    Hello all, I have a Fact table that has a metric (Value) where I have set the Aggregation rule to Sum. Now I'd like to create a metric based on the value of a Product Dimension that joins to this Fact table. So I create logical column that has the syntax - Case When Product_Desc = 'A' then Value else 0 End.
    The issue is in Answers when I bring this new metric in it doesn't bring in the correct value, are there steps I am missing with creating this metric?
    My assumption is if I just bring that new metric in by itself it would return one record - A sum of the Value where the Product = 'A'.
    Thank you

    Hi BRizzle,
    In your scenario, you creatre a calculated measure using the employee dimension, and then this measure show "#VALUE" on the pivot table, right? It seems that it's a limitation of using calculated measures in SQL Server Analysis. Calculated measures cannot
    be secured using Dimension Security in a straight forward manner, in fact they won't be listed at all in the Dimension tab of the role where we define the Dimension security. When such measures are browsed in client tools like Excel, the value that would be
    displayed is an error value like #VALUE. For the detail information about it, please see:
    Limitations / Disadvantages of using Calculated Measures / Calculated Members in SSAS
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    Charlie Liao
    TechNet Community Support

  • Limiting Dimension Values to Dimension Values used on Specfic Day

    If I have a dimension with thousands of values. And within my cube, on a given day only a few of those dimension values are actually used. How can I limit the scope of my dimension values to be only the values that exist on that given day?

    You can check OLAP DML Programs chapter (chapter 4 in 11g doc set) in Oracle OLAP DML Reference document. It's part of the standard olap documentation.
    Also regd the parameterization question:
    The code as pasted below is already parameterized. By parameterization, do you mean something other than passing value from front-end to the back-end (database)?
    Typically the front end report/query will refer to a series of time dimension values -- say, 16-Jul-2012 to 22-Jul-2012 for time. The report would reference a measure with a formula referring to an olap dml program. This program is called repeatedly for each cell and the appropriate dimension member values are passed as input to the program.
    argument _tm time  <-- implies that the program accepts time dimension value (corresponding to a single cell) as input and works off the same in its calculation.
    limit time to _tm   <-- usually this is done within a tempstat context to make such changes temporary for calculation w/o affecting external time dimension status. This allows the program to set the context of calculation to current cell (say 18-Jul-2012)
    "hence what follows for the rest of the program acts on the restricted status in order to calculate the current cell's value corresponding to time dimension value = 18-Jul-2012.
    That's also why the same program can return a different value for each cell (different return value for 18-Jul-2012 compared to return value for 21-Jul-2012) although it's being looped over dimension status implicitly.
    HTH
    Shankar

  • 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

  • Using cross-dimension values in FR reports.

    I need help understanding how a field name in a Financial Reporting report can be populated with an intersection of two different dimension members of an Essbase cube. For example, suppose I have two dimensions members in my cube - Sales and Qtr1. Now I want to create a single field in my FR report that would store values for Sales->Qtr1. Also, i want to have a field name like (Qtr1->Sales % Qtr2->Sales).
    My report would look as follows:
    Sales in Qtr1 | Sales in Qtr2 | Qtr1 Sales as a percent of Qtr2 Sales
    Region1 100 | 200 | 50%
    Region2 25 | 100 | 25%
    Thanks.
    Axe

    If you want to show two member descriptions or names within a single column header cell, then you need to use memberdescription / membername text functions.

  • Use dimension in HSF freeform calculation

    Hi everybody,
    I want to use dimension structure in Oracle Hyperion Strategic Finance Application.
    I assigned a user defined dimension, to an account. Then, I used a different dimension for any other account. e.g: v300.00.001/A1 - v300.00.002/B1
    Now, I want to create a freeform calculation for an account that names as v300.00.002/B1. My formula is; v300.00.002/B1= @DIM(v300.00.001, "A1")
    But this fomula, send error "HSF14359: The formula for v300.00.001/A1 requires v300.00.002/B1 which does not exist in this file.
    How can I solve this problem? Can I use freeform calculation with dimensional structure in HSF?
    Thanks.

    It's extremely annoying that the FLD() command isn't yet availlable in NW, unless it's coming with 7.5 or has been included in one of the more recent support packs.
    As a an alternative you may be able to use the following MDX routine:
    Returns the value of a property of the current member of a dimension
    *function PRO(%DIMENSIONNAME%,%PROPERTYNAME%)
    %DIMENSIONNAME%.Properties("%PROPERTYNAME%")
    *endfunction
    Unfortunately I've never been able to use this with a When statement, so you may have to ask an ABAP resource to develop a BADI to achieve your required results.

  • Few dimension values used in FACT tables.

    Hello all,
    We are trying to know if somebody faced this issue earlier. We have dimension tables containing 5 million records, but the fact table uses hardly 30k of these dimension values. The fact table contains 350 million records, so is there any way to improve the performance of the query in such a scenario, where hardly 20% of dimension values are actually used by the FACT tables.
    Thanks and Regards,
    Upendra

    nilanjan chatterjee wrote:
    Hi,
    >
    > The data for the parent members should be available in the SQL tables.
    > For example, 2011.TOTAL is parent member. You should not have any data for this member in your database. If it is there, it might have come somehow (may be an import). But this is not right. You might want to remove these records. But be sure that you dont delete the records for the base level members.
    >
    > Hope this helps.
    I guess you meant should not, right ?

  • Is there possibility to add dimension value into hierarchy using dml or spl

    1 Is there possibility to add dimension value into hierarchy using dml or spl?
    If such possibility exists how to do that.
    2 Is it possible to sort dimension values inside one branch of the hierarchy?

    What version of OLAP are you using and how did you create your AW (e.g., AWM)?
    Assuming that you're used either AWM or the Java API for AWs in 10g, there isn't an OLAP DML for adding a dimension member to a dimension (and have all the meta data kept in sync); you must load dimension members using AWM the Java API for AWs.
    So, make your changes in the the dimension table and process that table.
    For sorting, you can add a sort attribute to the dimension. Add the sort attribute to the model, indicate that it's used for sorting, add the sort attribute to your dimension table and maintain the dimension.

  • Using cumulated values for further calculation in a bex report

    Hi ya'll,
    I have a problem with using cumulated values in a bex report.
    the report has three lines:
    Values 1:    100    200  300
    Values 2:    10      5     40
    Values 3:    1000  500  4000
    The values of row 3 is a formula multiplying the values from row 1 and 2... My problem is that the values of row 3 are wrong - for example 200*5 isn't supposed to result in 500 !!
    I figure the reason is that the values of row 1 is a cumulated result, meaning the <i>actual</i> value of the second column of the first row i 100 (and not 200).
    How can I ensure that my formula for row 3 uses the <b>cumulated</b> result from row 1, instead of the underlying result ?.

    Create a column structure with Actual Value columns as well as cumulated value columns. Hide Actual Value Columns from display.
    Example :
    Actual1 | Actual 2 | Actual 3 | *** 1 | *** 2 | *** 3 |
    100 | 100 | 100 | 100 | 200 | 300 |
    You can create a forumla to calculate Value 3 : (Actual 1 * Value 2 ).
    I guess you are using Cell Referencing to achieve this.

  • How to limit  dimensions values of querybuilder

    Hi,
    I want to learn how to limit dimension value in query builder. i want, the user who run the querybuilder can not see a dimension value which i do not want to display.
    For example,
    The time dimension has "2000" and "2001" values as default which is defined in database. Normally when i run the querybuilder for create new presentation or calculation, In the dimensions panel of the querybuilder display all values of each of dimension. The user can select values which she/he want from that list.
    But i want to limit values which the user can see in the dimensions panel of the querybuilder. for this time dimension example, i want to hide "2001" value from the user. How can i do it. if there is any sample code, please share.
    Thank you very much for your helps.
    ilknur

    Thanks Thomas, excellent suggestions as always.
    If anybody wants more information regarding Thomas' suggestions please refer to
    Oracle9i OLAP Developer's Guide to the OLAP DML for the AW Permit command.
    In sumamry: To create permission programs, you define two programs with the names permit_read and permit_write. In these programs, you can specify PERMIT commands that grant or restrict access to individual workspace objects. In addition, you write these programs as user-defined functions that return a Boolean value, and the return value indicates to Oracle OLAP whether or not the user has the right to attach the workspace.
    For relational security there is an excellent tutorial on the database pages of OTN, follow this link:
    http://otn.oracle.com/obe/start/index.html
    then follow the links for Oracle9i Database Release 9.2.0.2 - Security - Creating Label-based Access Control. This module describes how to use Oracle Label Security to setup security based on label policies
    These security layers should be transparent to the OLAP metadata layer, therefore, once you have implemented your chosen security method your BI Beans application will only need to connect with the appropriate user to inherit the security layer. For more information see the Security section of the BI Beans Help:
    http://otn.oracle.com/bibeans/903/help/
    BI Beans product Management Team
    Oracle Corporation

  • Unable to use runtime prompts in calculation manager

    Hi All,
    I am unable to use runtime prompts in calculation manager (11.1.2.0).
    In Variable Designer I have selected global and created a Replacement variable with name "Entity" and selected Type as "Member" and Default Value as "Entity" from dimension list, checked the check box "rtp".
    In FIX (i.e., Member Range) I’m selecting this variable for Entity dimension, and validating this rule without any errors. And during deployment it is not prompting for Entity and directly a message appears that deployment was successful.
    My requirement is i should select a Entity member during runtime. Please help me out.
    Thanks.

    Are you accessing workspace url remotely on client machine?
    Can you try accessing the url on the server and check whether you can see the app in the Calc manager?
    Thanks
    Madhavi

  • Using Dimension Formulas to sum data based on different criteria

    Hi all,
    I am trying to use a u201CDimension Formulau201D to perform the following calculation:
    We have an account dimension which has 2 important properties:
    1.     CRITERIUMTYPE: This property can have 3 different values: u201CWERKu201D, u201CINVu201D OR u201CLIQu201D
    2.     ACCTYPE: This property can have 2 different values: u201CEXPu201D or u201CINCu201D
    The client wants to have a report that sums data based on these 2 properties. An example will help to clarify this:
    ACCOUNTS     CRITERIUMTYPE     ACCTYPE     VALUE
    ACCOUNT A         WERK                          EXP               100 u20AC
    ACCOUNT B         WERK                          INC               150 u20AC
    ACCOUNT C         WERK                          EXP               200 u20AC
    ACCOUNT D         WERK                          INC               300 u20AC
    ACCOUNT E         INV                          EXP               50 u20AC
    ACCOUNT F         INV                          INC               100 u20AC
    ACCOUNT G         INV                          EXP               200 u20AC
    ACCOUNT H         INV                          INC               500 u20AC
    The clients wishes to see this data in the following way:
    CRITERIUMTYPE     ACCTYPE     VALUE
       WERK                         EXP              300 u20AC
                                        INC              450 u20AC
       INV                         EXP              250 u20AC
                                     INC              600 u20AC
    In order to achieve this I have created several new accounts, one for each combination e.g.: Account WERKEXP is used to sum the data on the combination CRITERIUMTYPE=WERK and ACCTYPE=EXP. I have created a dimension formula in my account dimension but this is where I am stuck. I have created the following formula to calculate the account WERKEXP:
    IIF([BUDGETPOSITIE].CURRENTMEMBER.PROPERTIES("ACCTYPE")="EXP",IIF([BUDGETPOSITIE].CURRENTMEMBER.PROPERTIES("CRITERIUMTYPE")="WERK",[BUDGETPOSITIE].CURRENTMEMBER,0),0)
    The problem with this formula is the following:
    The formula will add all amounts that meet the 2 criteria mentioned in the formula, EXP and WERK, but as soon as it finds an accounts that does not match the 2 criteria it will set the account WERKEXP back to 0. I need to know if there is a way, using dimension formulas, of adding these values together without the new account being set to 0 as soon as one of the accounts it needs to check does not meet 1 of the 2 criteria.
    We are working on SAP BPC 7.5 for NW with SP04
    All help is very much appreciated!
    Kind regards,
    Stefano

    Hi,
    You can also use ParentHn property to have different grouping of accounts within the dimension.
    So in your case rather using the member formula you can have four accounts and add them in the Parenthn property for grouping it.
    1. The Solution proposed by Nilanjan is specific for a Report/IS and Performance will be good
    2. My solution will be global something similar to MDX formula, but performance may be slightly lesser than using excel function.
    Hope this helps,
    Regards,
    G.Vijaya Kumar

  • How to calculate variance between two dimension values

    Hello:
    I have built a cube in Analytical workspace (9.2.0.5) with 3 dimensions. Time, Product & Scenario. I am using BI Beans (thick client) for the presentation layer. What I need is the ability to calculate the variance between two dimension values of same measure. For example, if My scenarios are 'Actual' and 'Budget', when I present the results on the screen for any measure (e.g Total Sales), I should be able to calculate & display the difference between 'Actual' & 'Budget' values of that measure.
    I have more than 7 scenarios and more than 40 measures. It could even be the difference between two product categories. How do I do it either in AW or at BI Beans Level?
    Thank you very much for your help.
    regards
    Suresh

    You want to look at qualified data references in the OLAP DML references. Basically, any data reference may be qualified by specifying a dimension name and value:
    sales(time 'jan92')
    forces the dimension TIME to the member 'jan92', no matter whether 'jan92' is in status or not. The resulting expression is essentially no longer dimensioned by the dimension TIME.

  • Derived logical column using Row values in OBIEE11g

    Hi Experts
    I have a requirement whereby I need to create say 100 new logical column in obiee using the row values of one dimension.
    For eg. say I have dimension values like A and B in one of the table ,  I need to create logical columns like C=A+B and D = A/B and E = AxB as such when the user drags this to the analysis the calculation should happen automatically.
    The problem is they are in the rows and not the coulmn , so I can't do plain calculation like sales per Unit = Sales/Units - as Sales and Units are two differnet measure column.
    How to achieve this in RPD.
    Regds

    Hi
    Pls. find below the examples :
    You have a dimesion called KPI which has soem KPIs.
    KPI           Measure Values
    KPI1          10
    KPI2          20
    KPI3          50           
    etc
    Now I need to calulate a driven KPI i.e KPI10 which is KPI10 = KPI2/KPI3 , and I need to do that in RPD.
    I know I can do it in Front end analaytics by using Pivot or Selection steps . But I want to do it in RPD.
    Regds

Maybe you are looking for