Loading

Showing Top and Bottom N Per Category

Дата публикации: Feb 20, 2026
Задача
How to show top and bottom N per category.
Действия

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.

Дополнительные ресурсы

 
Номер статьи базы знаний

001456781

Вложения

top-bottom n per category.twbx

350 KB

 
Загрузка
Salesforce Help | Article