Creating a calculated measure or dimension

You can create calculated measures and dimensions using the SAP Lumira formula language.

The following features are supported in the formula editor:
  • Combining any two columns in a dataset
  • Applying functions from a predefined set of numeric, date, and text functions
  • Using "if," "then," "else" clauses
  • Using automatic completion to improve editing speed
  • Using a calendar picker for date parameters
  • Copying text and syntax to a function definition
  1. Select the Calculation button, and select New Calculated Dimension or New Calculated Measure.
    Tip You can create a calculated measure or dimension with the Options gear icon next to a measure or dimension, or by selecting Create Calculated Dimension on the Manipulation Tools panel.
  2. Enter a name for the measure or dimension.
  3. Double-click one or more measures or dimensions and functions to add them to the Formula syntax box.
  4. Enter parameters for the function and associated information based on the function task.
    You must enter the names of columns used in the formula. Automatic completion will suggest a column name after you start entering the first letter.
  5. If you are inputting calendar information, select the Select a Date button at the bottom of the functions list, and use the date picker to select dates.
  6. Select OK to apply the formula.
    A measure or dimension is created.

Example

Suppose you want to create a dimension that multiplies the values in the <margin_gross_percent> column by 100 and rounds up to the next integer.
  1. Select the Calculation button, and select New Calculated Dimension.
  2. In the New Calculated Dimension dialog, double-click a dimension object or function to insert the dimension or function in the Formula box. For example, double-click Ceil(num).
  3. Edit the formula and add other dimension objects as needed. A new column with a default formula name is created. For example, add Ceil(margin_gross_percent )*100 to the formula to create a column called Ceil(margin_gross_percent )*100.
  4. Enter a name for the new calculated dimension column, and select OK. The new column is created in the Data pane and appears on the Measures and Dimensions panel.