Skip to main content

SOLVE_ORDER Clause (MDX)

Used with a definition of a calculated member, this clause specifies the order in which to apply the definition of this calculated member relative to other calculated members. This clause is relevant only if the query contains calculated members on both axes.

Syntax and Details

You can use this clause when you define a calculated member with the CREATE MEMBER Statement or with the WITH Clause.

SOLVE_ORDER=integer

The SOLVE_ORDER keyword is not case-sensitive. For integer, specify a literal integer. The default is 0.

This clause is useful in a query that has a calculated member as a column and a conflicting calculated member as a row. This clause affects how the system determines the value in the cell and the format applied to the cell. By default, the column determines FORMAT_STRING.

If you instead want the row to determine the format and the value, ensure that SOLVE_ORDER is higher for the calculated member used as a row.

With one exception, the calculated member with the higher SOLVE_ORDER is evaluated last and thus controls the results. The exception is that if a row or column uses the %CELL function, its implicit default SOLVE_ORDER is 10.

If the row and column both use %CELL and you want the row to determine the value and format string, set the SOLVE_ORDER to 11 for the row.

If the column and row members have the same SOLVE_ORDER, the column member controls the results, as in the default case.

For calculated measures that depend on other calculated measures, the system recognizes the dependencies and evaluates the measures in the appropriate order; you do not need to use SOLVE_ORDER for these measures.

See Also

FeedbackOpens in a new tab