Loading

Showing Top and Bottom N Per Category

Publiceringsdatum: Feb 20, 2026
Uppgift
How to show top and bottom N per category.
Steg

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.

Ytterligare resurser

 
Knowledge-artikelnummer

001456781

Bilagor

top-bottom n per category.twbx

350 KB

 
Laddar
Salesforce Help | Article