TOPSUM
Description:
This function is used to sort a set and return the topmost elements whose cumulative total is at least a specified value.
Syntax:
TopSum(Set_Expression, Value, Numeric_Expression)
Return type:
SET
Parameters:
Parameter | Description |
|---|---|
Set_Expression | It is a valid MDX expression that returns a set. |
Value | It is a valid numeric expression that specifies the value against which each tuple is compared. |
Numeric_Expression | It is a valid numeric expression, typically an MDX expression of cell coordinates that returns a number. |
Example:
SELECT
[Measures].[Internet Order Quanlity] ON 0,
TOPSUM(
[Customer].[Geography].[Country]
,50000,[Measures].[Internet Order Quanlity])
ON 1
FROM [AdventureWorksMF]