Loading

Showing Top and Bottom N Per Category

Udgivelsesdato: Feb 20, 2026
Opgave
How to show top and bottom N per category.
Trin

The attached example workbook uses the example data set Superstore to demonstrate the following instructions:

  1. Create a Parameter, 'N Parameter', setting it to Integer and the number of values you want displayed (3 in this case)
  2. Create a calculated field with a name like "Top & Bottom N Filter" with a calculation similar to the following:

    RANK( SUM( [Sales] ), 'desc' ) <= [N Parameter]

    OR

    RANK( SUM( [Sales] ), 'asc' ) <= [N Parameter]

    The above calculation returns a value of true if SUM( [Sales] ) is the highest N ranking sub-categories for either largest first or smallest first.

  3. Drag Top & Bottom N Filter to the Filters shelf and click OK to close the Filter dialog.

  4. In the Filter dialog, check True and click OK.

Yderligere ressourcer

 
Vidensartikelnummer

001456781

Vedhæftede filer

top-bottom n per category.twbx

350 KB

 
Indlæser
Salesforce Help | Article