OLAP Server User Guide
MDX Documentation
MDX Functions Reference

Calculated Members

(MDX)

Calculated measures allows for defining new measures.

Description


A powerful feature of MDX is defining new measures, known as calculated measures (or calculated members).

They are defined before the SELECT statement :


WITH
MEMBER [Measures].[Diff with United States] AS '[Measures].[Amount] - ([Geography].[United States],[Measures].[Amount])'
MEMBER [Geography].[Geo].[Europe I] AS '[Geography].[Geo].[Europe] - [Geography].[Geo].[Switzerland]'
SELECT
...


In this example, the new measure allows for defining a value based on a formula. This formula may override any member from any hierarchy as defined by the evaluation context of the formula (e.g., axes, slicer, etc...).

Similarly, calculated members can be declared (and removed) at schema level using the CREATE / DROP statements.


DROP MEMBER [Measures].[Benefit]
CREATE CALCULATED MEMBER [Measures].[Benefit] AS [Measures].[Sales] - [Measures].[Cost]


Cell Properties allows for defining meta-information attached to calculated members.

Please, check working examples for further explanation.

See Also

Cell Properties Create (Member) Drop (Member) AddCalculatedMembers StripCalculatedMembers

Examples

XMLA Properties

Find here the value of the XMLA properties when not specified otherwise.