sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function topRanking

topRanking( attribute, measure, count, config?): Filter

Creates a filter to isolate items that rank towards the top for a given measure.

Parameters

ParameterTypeDescription
attributeAttributeAttribute to filter
measureMeasureMeasure to filter by
countnumberNumber of members to return
config?BaseFilterConfigOptional configuration for the filter

Returns

Filter

A filter instance

Example

Filter for age ranges with the top 3 highest total revenue in the Sample ECommerce data model.

filterFactory.topRanking(
  DM.Commerce.AgeRange,
  measureFactory.sum(DM.Commerce.Revenue),
  3
)
Last Updated: