As we already saw in the first recipe, Creating and publishing a Mondrian schema, we can define a set of calculated measures in the cube definition. Sometimes, it is useful to have the capability to define custom calculated measures. This recipe will show how we can easily do this with little knowledge of the MDX language. Note that this recipe makes use of Pentaho Analyzer, a tool available only in the EE version of Pentaho.
The following steps detail how to add a simple calculated measure to our report:
From the Store Type category, take the Store Type field and drag it to the Rows layout zone. From the Time category, get the Quarter field and drag it to the Columns layout zone. Then, from the Measures category, get the Store Sales field and drag it to the Measures layout zone.
Suppose we want to define a measure to evaluate the trend of our Store Sales table over quarters. Right-click on the Store Sales column header and select the Trend...