Versions Compared

Key

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

Description:

This function is used to return a number that is calculated by aggregating over the cells returned by the set expression. If a numeric expression is not provided, this function aggregates each measure within the current query context by using the default aggregation operator that is a member property function, used to return the display value of the mentioend memberspecified for each measure. If a numeric expression is provided, this function first evaluates, and then sums, the numeric expression for each cell in the specified set.

Syntax:

MemberAggregate(Set_Expression .caption OR Member[ ,Numeric_Expression .PROPERTIES(Caption])

Return Type:
SCALAR

Parameters:

Parameter

Description

Set_Expression

It is a valid MDX expression that returns a set.

Numeric_Expression

A valid numeric expression is typically an MDX expression of cell coordinates that returns a number.

Example:

Code Block
languagejava
WITH MEMBER [Measures].[ResultDC] AS
    CAPTIONAggregate([Dimensions].[Hierarchy].CURRENTMEMBER..PROPERTIES(caption)) SELECT [Customer].[Geography].[Country].&[Australia],
		[Customer].[Geography].[Country].&[Canada]
    )
SELECT  
    [Measures].[Result]DC] ON COLUMNS,
    [Product].[Product Categories].Children ON 0ROWS
FROM
     [CubeNameAdventureWorksMF]