Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

COUNT 1:
Description:

This function is used to return the number of levels in hierarchy. It includes ALL level in count.

Syntax:

Hierarchy_Expression.Levels.Count

Return Type:
SCALAR

Parameters:

Parameter

Description

Hierarchy_Expression

It is a valid MDX expression that returns a hierarchy.

Example:

Code Block
languagejava
WITH MEMBER Measures.X AS  
   [Product].[Product Categories].Levels.Count   
Select Measures.X ON 0  
FROM [AdventureWorksMF]

COUNT 2:
Description:

This function is used to return the number of cells in a set.

Syntax:

Count(Set_Expression [ , ( EXCLUDEEMPTY | INCLUDEEMPTY ) ] )

Return Type:
SCALAR

Parameters:

Parameter

Description

Set_Expression

It is a valid MDX expression that returns a set.

Example:

Code Block
languagejava
WITH MEMBER measures.X AS  
 Count([Customer].[Geography].children)  
SELECT measures.X ON 0  
FROM [AdventureWorksMF]

COUNT 3:
Description:

This function is used to return the number of cells in a set.

Syntax:

Set_Expression.Count

Return Type:
SCALAR

Parameters:

Parameter

Description

Set_Expression

It is a valid MDX expression that returns a set.

Example:

Code Block
languagejava
WITH MEMBER measures.X AS  
[Customer].[Geography].children.count  
SELECT measures.X ON 0  
FROM [AdventureWorksMF]

COUNT 4:
Description:

This function is used to return the number of dimensions in a tuple.

Syntax:

Tuple_Expression.Count

Return Type:
SCALAR

Parameters:

Parameter

Description

Tuple_Expression

It is a valid MDX expression that returns a tuple.

Example:

Code Block
languagejava
WITH MEMBER MEASURES.COUNTTUPLE AS  
COUNT(([Measures].[Internet Sales Amount], [Customer].[Geography].[Country].&[Australia]))  
SELECT MEASURES.COUNTTUPLE ON 0  
FROM [AdventureWorksMF]