TOPPERCENT
Description:
This function is used to sort a set in a descending order, and return a set of tuples with the highest values whose cumulative total is equal to or greater than a specified percentage.
Syntax:
TopPercent(Set_Expression, Percentage, Numeric_Expression)
Return type:
SET
Parameters:
Parameter | Description |
|---|---|
Set_Expression | It is a valid MDX expression that returns a set. |
Percentage | It is a valid numeric expression that specifies the percentage of tuples to be returned. |
Numeric_Expression | It is a valid numeric expression, typically an MDX expression of cell coordinates that returns a number. |
Example:
WITH MEMBER [Measures].[Top 10 Sales] AS
SUM(TopCount([Product].[Product].[Product].Members, 10, [Measures].[Internet Sales Amount]),
[Measures].[Internet Sales Amount])
SELECT {[Measures].[Internet Sales Amount], [Measures].[Top 10 Sales]} ON COLUMNS
FROM [AdventureWorksMF_ValueBased]