MDX Operators

MDX Operators

This documentation is for Kyvos 2026.6.x. To view documentation for other Kyvos versions, click here.

This documentation is for Kyvos 2026.6.x. To view documentation for other Kyvos versions, click here.

Arithmetic Operators

Description: Standard arithmetic operations for building calculated expressions.

Operator

Operation

Example

+

Addition

[Sales] + [Tax]

-

Subtraction

[Sales] - [Cost]

*

Multiplication

[Units] * [Price]

/

Division

[Profit] / [Sales]

WITH MEMBER [Measures].[Gross Profit] AS [Measures].[Internet Sales Amount] - [Measures].[Total Product Cost] MEMBER [Measures].[Profit Ratio] AS [Measures].[Gross Profit] / [Measures].[Internet Sales Amount] SELECT {[Measures].[Internet Sales Amount], [Measures].[Total Product Cost], [Measures].[Gross Profit], [Measures].[Profit Ratio]} ON COLUMNS, [Product].[Product Categories].[Category].Members ON ROWS FROM [Adventure Works]

AS Keyword

Description: Used in WITH clause to name a calculated member or set expression.

Syntax:

  • MEMBER Parent.Member AS Expression

  • SET Set_Name AS Set_Expression

WITH MEMBER [Measures].[Profit Margin] AS ([Measures].[Internet Sales Amount] - [Measures].[Total Product Cost]) / [Measures].[Internet Sales Amount] SELECT [Measures].[Profit Margin] ON COLUMNS, [Product].[Product Categories].[Category].Members ON ROWS FROM [Adventure Works]

 

Parentheses

Description: Used for grouping expressions and controlling evaluation order.

Syntax: ( Expression )

WITH MEMBER [Measures].[Adjusted Sales] AS ([Measures].[Internet Sales Amount] * 1.1) - ([Measures].[Total Product Cost] * 0.9) SELECT [Measures].[Adjusted Sales] ON COLUMNS, [Product].[Product Categories].[Category].Members ON ROWS FROM [Adventure Works]

Tuple Notation

Description: A tuple is an ordered collection of members, one from each dimension, that identifies a single cell in the cube.

Syntax: ( Member1, Member2, ... )

-- Access a specific cell: Bikes sales in 2012 SELECT ([Product].[Product Categories].[Category].[Bikes], [Date].[Calendar].[Calendar Year].[2012]) ON COLUMNS FROM [Adventure Works] WHERE [Measures].[Internet Sales Amount]

Range Operator ( : )

Description: Creates a set of contiguous members between two members on the same level.

Syntax: Member1 : Member2

-- Select months from January to June 2012 SELECT [Measures].[Internet Sales Amount] ON COLUMNS, [Date].[Calendar].[Month].[January 2012] : [Date].[Calendar].[Month].[June 2012] ON ROWS FROM [Adventure Works]

Concatenation Operator ( || )

Description: Concatenates two sets.

SELECT [Measures].[Internet Sales Amount] ON COLUMNS, [Product].[Product Categories].[Category].[Bikes].Children || [Product].[Product Categories].[Category].[Accessories].Children ON ROWS FROM [Adventure Works]

 

Copyright Kyvos, Inc. 2026. All rights reserved.