Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Calculated measures usage and recommendations 

 

In BOE XI3.x you can create calculated measures/key figures in universes.

Calculated Measures definitions are using MDX functions embedded in XML tags.

 

In order to create calculated measures, users must to create pure MDX expression embedded in XML tags: <EXPRESSION></EXPRESSION>

In this new expression, we authorize to use any Designer function such as:

    • @Prompt
    • @Variable

The check integrity ONLY validate the XML syntax and @Select function.

No MDX parser is provided in this version of Universe Designer.

 

We recommend using @Select as much as possible rather than the measure definition for multiple reasons:

    1. @SELECT is always resolved at query time
    2. Life Cycle Management only ensure integrity with generated objects not with objects created by a user: @Select always guarantee the validity of the object

 

@Select function must be used like this: @Select(Parent class\Object)

This function is case sensitive as well as class name and object name.

@Select always refer universe metadata and not database definition.

 

A calculated measure can be used in a pre-defined filter.

The expression can be embedded in the filter definition ore referenced by using an @Select function.

In such a case the filter definition must start as following:

<FILTER EXPRESSION="@Select(Class\Object)">
<FILTER EXPRESSION="IIF(.[Quantity] = 2000, 1, 0)">

     

    SAP MDX restrictions:

    The list below describes the main SAP MDX restrictions compared to Microsoft MDX functions: 

      1. Calculated measures must return numeric values only
      2. Set functions such as SETTOSTR, TUPLETOSTR, MEMBERTOSTR, STRTOARRAY are not supported
      3. Data type conversion functions such as CDate, CInt, CStr are not supported
      4. Case When Else statement is not supported
      5. Some operators such as <, >, <=, >= can not be used in any case
      6. etc
    3 Comments