$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYHB2UGHU3HQWDKR&XVWRPHU6XSSRUW3RUWDO
Customer Portal
Submit a request
Lavakumar Ethamukkala
Search
Pentaho Customer Support Portal > Model and Design > Schema Workbench Design Tool
Follow
Issue:
Analyzers Calculated Measures and Solve Order
Environment:
Pentaho BA Server 4.8.x and up
Resolution:
MDX uses SOLVE_ORDER to deal with multidimensional formula precedence. Every calculated
member has a solve order number defined as an integer that tell Analyzer how to set the
priority to proceed on calculating the values on each calculated member cell.
Take for example the following example using Steel Wheels:
Quantity + 1 Million is created using a user defined number in Analyzer as follows:
KWWSVVXSSRUWSHQWDKRFRPKFHQXVDUWLFOHV$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYH2UGHU
$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYHB2UGHU3HQWDKR&XVWRPHU6XSSRUW3RUWDO
The Grand Total cell for the calculated measures shown in red has two competing calculated
members. These two calculated members are listed below with their corresponding MDX as
grabbed from the Analyzer's HTML log file:
Quantity + 1 Million = Solve Order = 0
MDX: MEMBER [Measures].[*CALCULATED_MEASURE_0] AS '[Measures].[Quantity]+1000000',
$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYHB2UGHU3HQWDKR&XVWRPHU6XSSRUW3RUWDO
SOLVE_ORDER=100
Since Grand Total has a higher solve order than Quantity + 1 Million, then the bottom right cell
will be calculated by iterating over each territory and then summing up quantity + 1,000,000
hence resulting on 4,105,331
Checking the Calculate subtotals using formula box, the Quantity + 1 Millions solve order will
be changed from 0 to 200. Now because Quantity + 1 Million has a higher solve order than
Grand Total, then the bottom right cell will be calculated by adding 1,000,000 to the sum of each
territorys quantity.
If you are using Pentaho Schema Workbench to declare your calculated member you can use a
CalculatedMemberProperty to define the solve order:
KWWSVVXSSRUWSHQWDKRFRPKFHQXVDUWLFOHV$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYH2UGHU
$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYHB2UGHU3HQWDKR&XVWRPHU6XSSRUW3RUWDO
Another classic example to ilustrate the solve_order is when using Average; the grand total
average can be in two formats:
- The Sum of each lines' average
- The Average of the total
Calculated Member
Solve Order
Purpose
Formatting
500
Numeric Filters
400
300
Smart Measures
200
Sum Totals
100
KWWSVVXSSRUWSHQWDKRFRPKFHQXVDUWLFOHV$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYH2UGHU
$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYHB2UGHU3HQWDKR&XVWRPHU6XSSRUW3RUWDO
Aggregate Totals
-100
Trend Hangar
-200
Slicer
-300
COMMENTS
Product
Solutions
Services
About Us
Sites
Big Data
Finance
Custom Dashboards
Leadership
Blog
Data Integration
Healthcare
Consulting Services
Partners
Community
Embedded Analytics
Retail
Training
Careers
Documentation
Business Analytics
Government
Certification Program
Media Kit
Wiki
Cloud Analytics
Enterprise
Enterprise Support
Awards
Technical Support
Press Releases
Experience Pentaho
Business Analytics
Try Pentaho
(866) 660-7555
News
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy | Sitemap
KWWSVVXSSRUWSHQWDKRFRPKFHQXVDUWLFOHV$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYH2UGHU
$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYHB2UGHU3HQWDKR&XVWRPHU6XSSRUW3RUWDO
KWWSVVXSSRUWSHQWDKRFRPKFHQXVDUWLFOHV$QDO\]HUV&DOFXODWHG0HDVXUHVDQG6ROYH2UGHU