Distinct (MDX)

Updated: 15 September 2007

Evaluates a specified set, removes duplicate tuples from the set, and returns the resulting set.



A valid Multidimensional Expressions (MDX) expression that returns a set.

If the Distinct function finds duplicate tuples in the specified set, the function keeps only the first instance of the duplicate tuple while leaving the order of the set intact.

The following MDX query shows the usage of the Distinct function and the results that the function retrieves from the sample cube, AdventureWorks.

Select Distinct({[Geography].[Country].&[Australia],




[Geography].[Country].&[United States],

[Geography].[Country].&[United Kingdom],

[Geography].[Country].&[Canada]}) on 1,

[Measures].[Reseller Sales Amount] on 0

from [Adventure Works]

As shown in the following results, the order of the results in the set is the same as in the tuples in the query. However, duplicate tuples have been removed.

Reseller SalesAmount




United States$53,607,801.21

United Kingdom$4,279,008.83

Release History

15 September 2007

New content:
  • Added example.

17 July 2006

Changed content:
  • Updated syntax and arguments to improve clarity.

Community Additions