TOPSUM

TOPSUM

This documentation is for Kyvos 2026.5.x. To view documentation for other Kyvos versions, click here.

This documentation is for Kyvos 2026.5.x. To view documentation for other Kyvos versions, click here.

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

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:

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]

Copyright Kyvos, Inc. 2026. All rights reserved.