Description:
This function is used to evaluate a set and returns the average of the non-empty values of the cells in the set, averaged over the measures in the set or over a specified measure.
Syntax:
Avg( Set_Expression [ , Numeric_Expression ] )
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 | ||
---|---|---|
| ||
WITH MEMBER
[Measures].[Average] AS
Avg (
[Customer].[Geography].[Country],
[Measures].[Reseller Sales Amount]
)
SELECT
[Measures].[Average] ON COLUMNS,
{
[Product].[Product Categories].[Category] |