Home      Functions     Common Solutions      Contact     

MDX Functions:
MDX Functions

Common Solutions

Common Solutions
Resource Links

MDX Books
MDX Related Software
MDX Related Blogs
Other Links

Contact Us
Microsoft SQL Server Analysis Services Function Page
Function Name: Distinct
Category: Set
Description: The Distinct function removes duplicate tuples from the supplied set and returns a the unique set.
Syntax: DISTINCT( «Set» )
Technet Link: MDX Distinct Function

The query below would remove duplicate City members in the Geography hierarchy in the Geography dimension if they existed.

      {} ON COLUMNS,
      DISTINCT([Geography].[Geography].[City].Members) ON ROWS
      [Adventure Works]

In the query below, you will notice that there are three Cities with the name Saint Ouen. Although the member name is a duplicate, each member has it's own unique name, therefore, they are not considered duplicates.
      MEMBER [Measures].[UniqName] AS
      {[Measures].[UniqName]} ON COLUMNS,
      FILTER([Geography].[Geography].[City].Members, [Geography].[Geography].CurrentMember.Name = "Saint Ouen") ON ROWS
      [Adventure Works]


Copyright 2008 by MDXpert.com.
Terms of Use                              Privacy Statement
Site Powered By - WinHost.Com