# Top N + others

Top N answers questions such as *Customers* contributing to the most revenue, *Spend Categories* that consume most of the budget, etc.

In this section, let us see how the Top N feature works in Plan.

Consider the example of displaying the Top 5 Brands that generated maximum Revenue.

a) Select the Revenue column.

b) In the 'Home' tab of the toolbar, select 'Top n' from the 'Analyze' section. The Top N dialog box appears. Fill in the details to filter the Top 5 Brands. Click 'Apply'.

{% hint style="info" %}
To show the top 5% of items, just change the selection ‘Value’ to ‘Percentage’.<br>
{% endhint %}

<figure><img src="/files/DvGMuG4C1e7XAKJkSTs2" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>TopN pop-up.</sub></p>

c) You can see the top 5 categories with the remaining categories grouped under 'Others'*.* It also indicates how many items are a part of the 'Others' row.

<figure><img src="/files/dZnApLGUbWMBDTB61yKP" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Others section.</sub></p>

d) Hover over the 'Others' row to see a preview of the items grouped under Others. Click on the expand icon to view all the categories that have been classified as Others. This will display all the categories under 'Others' in a separate window.

<figure><img src="/files/fIUCK8f7yS057g9zADHd" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Other category details.</sub></p>

<figure><img src="/files/eTrVpskL3kBIfJRw6ZrV" alt=""><figcaption><p>Others are listed in a separate window</p></figcaption></figure>

## 1. Nested rules <a href="#id-1.-nested-rules" id="id-1.-nested-rules"></a>

a) To do a nested Top N, like the bottom 3 Categories in each of the top 2 Brands, you can create multiple rules by clicking ‘Add rule’ and filling in the fields as shown. Click 'Apply'.

<figure><img src="/files/75sxK9vJyrVZb6pZppwR" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Nested rules</sub></p>

b) The above setup displays the following output. Note that the 'Others' row is available for Brands and Categories.

<figure><img src="/files/k4SGDttl9FSrGKU5sKDX" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Nested Top N.</sub></p>

## 2. Multi-level nested rules <a href="#id-2.-multi-level-nested-rules" id="id-2.-multi-level-nested-rules"></a>

a) You can increase the number of hierarchy levels even beyond two (2). Add rules to configure the third category as shown below.

<figure><img src="/files/eC4XJBtJGKHYUQ5pKsr2" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Multilevel top N.</sub></p>

## 3. Suffix ‘Others’ <a href="#id-3.-suffix-others" id="id-3.-suffix-others"></a>

When using the multi-level and nested Top N implementation, it may not be clear as to what a specific 'Others' row refers to.

<figure><img src="/files/oNt9JLZCy6gsW9nKIMk6" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Suffix Others.</sub></p>

You can hover over the other options to view the list, which can then be expanded and viewed on a separate page using the expand icon ![](/files/Yj8MJNl6l0UTic7JwWX6).

<figure><img src="/files/Mc9Dw80CnLD5no3hAMSQ" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Suffix others with category name</sub></p>

To delete a Top N condition, click on the 'Delete' icon. To clear all the Top N conditions, click on 'Reset all'.

<figure><img src="/files/mOt0S5zSW7Yt4rNu2LV2" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Delete &#x26; reset</sub></p>

A warning message is displayed when you try to apply Top N on more than one column/measure. You need to remove the existing filter and apply a new one to the selected column by clicking on 'Remove and proceed'.

<figure><img src="/files/kZ2q1msoY0RUQ63sErom" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Applying top N filter on multiple columns throws a warning.</sub></p>

## 4. Modifying the Others bucket <a href="#id-4.-modifying-the-others-bucket" id="id-4.-modifying-the-others-bucket"></a>

Plan offers multiple options to add or remove items from the 'Others' bucket.

1. To add or remove rows from the 'Others' bucket, click on the row gripper and select the 'Add row to others' or 'Remove from others' option.

a) For data that is not hierarchical, select the 'current category' option.

b) For data that is hierarchical and contains the same element at different levels, you have two options:

* To add or remove a particular element from its immediate parent, select '**Current Category'.**
* To add or remove a particular element from all levels that contain that element, select '**All Category**'.

<figure><img src="/files/15gQLaa5r76BtfoqAQOI" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Removing rows from Others</sub></p>

2. You can also highlight rows that are manually added or removed from the Others bucket. You can enable the 'Highlight add/remove rows -TopN' from **Settings > Appearance > Misc tab.**
3. You can also apply additional customizations such as setting a custom background and border color for rows that are removed or added to the Others bucket.

<figure><img src="/files/werCN22CBf4vOa65j0Av" alt=""><figcaption></figcaption></figure>

<p align="center"><sub>Highlighted Rows from Others.</sub></p>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabricplan.com/planning/working-with-lumel-epm/3.-basic-interactions/explore-and-filter-data/top-n-+-others.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
