DistinctCount(MDX)

집합에서 공백이 아닌 고유한 튜플 수를 반환합니다.

구문

DistinctCount(Set_Expression)

인수

  • Set_Expression
    집합을 반환하는 유효한 MDX 식입니다.

주의

DistinctCount 함수는 Count(Distinct(Set_Expression), EXCLUDEEMPTY)와 동일합니다.

다음 쿼리에서는 DistinctCount 함수를 사용하는 방법을 보여 줍니다.

WITH SET MySet AS

{[Customer].[Customer Geography].[Country].&[Australia],[Customer].[Customer Geography].[Country].&[Australia],

[Customer].[Customer Geography].[Country].&[Canada],[Customer].[Customer Geography].[Country].&[France],

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

*

{([Date].[Calendar].[Date].&[20010701],[Measures].[Internet Sales Amount] )}

//Returns the value 3 because Internet Sales Amount is null

//for the UK on the date specified

MEMBER MEASURES.SETDISTINCTCOUNT AS

DISTINCTCOUNT(MySet)

SELECT {MEASURES.SETDISTINCTCOUNT} ON 0

FROM [Adventure Works]

참고 항목

참조

Count(집합)(MDX)

MDX 함수 참조(MDX)