TopCount

The MDX TopCount function returns a set of n elements ordered from largest to smallest, optionally based on an evaluation. This function ignores missing values.

Syntax

TopCount ( set , index [,numeric_value_expression ] )

Arguments

set

The set from which the top n elements are selected.

index

The number of elements to include in the set (n).

numeric_value_expression

Optional. An expression further defining the selection criteria.

Notes

Examples

select { ([Calendar].[ALL].[2021]) } on 0, topCount(crossjoin(members(measure), children([Store Type].[ALL]), lateralMembers([Payment Method].[ALL].Other)), 10, ([Calendar].[ALL].[2021])) on 1 from [Online Store] ;
2021
sales amountPlatform Self-operated StoreDebit Card6061
sales amountPlatform Self-operated StoreAccount Balance6058
sales amountBrand Flagship StoreCredit Card6052
sales amountPlatform Self-operated StoreCredit Card5985
sales amountOtherDebit Card5942
sales amountOtherCredit Card5686
sales amountBrand Flagship StoreAccount Balance5572
sales amountBrand Flagship StoreDebit Card5333
sales amountOtherAccount Balance5270
sales quantityBrand Flagship StoreCredit Card5113
About

What is EuclidOLAP?
Architecture
Code & Docs

EuclidOLAP
Olap Web Console
Getting Started
Download
Community


Contact Us

euclidolap@outlook.com
Copyright © 2023 euclidolap.com. All Rights Reserved