Calculations

Measures ..

Workshop - Calculations

Calculated Measure

  1. Start Schema Workbench:

Windows (PowerShell):

Linux:

  1. Ensure Pentaho Server is running:

Calculated Member - Unit Price

Calculated measures are derived metrics defined within the OLAP semantic layer that combine, transform, or aggregate base measures to create business-critical analytics. Unlike base measures that directly represent data stored in source tables, calculated measures use MDX (Multidimensional Expressions) formulas to perform operations ranging from simple arithmetic - such as dividing Sales by Quantity to determine average unit price - to sophisticated analytical functions like identifying top-performing customer segments through ranking and aggregation.

By defining these calculations once within the Mondrian schema rather than recreating them in individual reports, organizations ensure consistent metric definitions across all analyses, eliminate calculation errors from redundant implementations, and embed business logic directly into the data model where it can be centrally maintained and automatically available to all report developers and end users.

Calculated Member

  1. In the left pane, right-click ClassicModelsOrders Cube, and click Add Calculated Member.

  2. To create the calculated member, type or choose:

Attribute
Value

name

UnitPrice

dimension

Measures

visible

selected

formula | formulaElement

[Measures].[Sales] /

[Measures].[Quantity]

formatString

$#,###.00

  1. Save and Publish the Schema.


Analyzer Report

  1. From the User Console Home Perspective, click Create New > Analysis Report.

  2. In the Select Data Source dialog, click Classic Models: ClassicModelsOrders.

  3. Drag Sales to the Measure drop zone.

  4. Drag Quantity to the Measure drop zone below Sales.

  5. Drag Customer to the Rows drop zone.

  6. Save the report in the Training folder as Calculated Member report.

  7. Close the Calculated Member report.

Last updated

Was this helpful?