DistinctCount(MDX)DistinctCount (MDX)

적용 대상:예SQL Server Analysis Services아니요Azure Analysis ServicesAPPLIES TO:yesSQL Server Analysis ServicesnoAzure Analysis Services

집합에서 공백이 아닌 고유한 튜플 수를 반환합니다.Returns the number of distinct, nonempty tuples in a set.

구문Syntax


DistinctCount(Set_Expression)  

인수Arguments

Set_ExpressionSet_Expression
집합을 반환하는 유효한 MDX 식입니다.A valid Multidimensional Expressions (MDX) expression that returns a set.

주의Remarks

DistinctCount 함수는 동일 Count(Distinct(Set_Expression), EXCLUDEEMPTY)합니다.The DistinctCount function is equivalent to Count(Distinct(Set_Expression), EXCLUDEEMPTY).

Examples

다음 쿼리에서는 DistinctCount 함수를 사용하는 방법을 보여 줍니다.The following query shows how to use the DistinctCount function:

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]

관련 항목:See Also

Count ( 설정 ) ( Mdx) Count (Set) (MDX)
MDX 함수 참조 ( Mdx)MDX Function Reference (MDX)