Top N Filter in Power BI
In Power BI, the Top N filter is a built-in feature that allows us to display the top or bottom N items in a visual based on a specific value, such as sales, revenue, or any other numeric measure. This is particularly useful for focusing on the most or least significant data points in a dataset, like the top 10 customers by sales or the bottom 5 products by profit. We can apply this filter without writing any DAX code, making it accessible through the graphical interface.
Let’s see this step by step:
Step 1: Add the Name and Marks field on the canvas and create a table visual.

Step 2: Now let open the Filters pane. In the Filters pane, locate the field we added to the visual under "Filters on this visual". Click the dropdown next to it. Change the filter type from "Basic Filtering" to "Top N".

Step 3: In the "Show items" section, specify the number of items (e.g., 10 for top 10) and choose whether we want the "Top" or "Bottom" items.

Step 4: Define the Value Drag a numeric field (e.g., "Sales Amount") into the "By value" box. This is the measure Power BI will use to rank the items.

Step 5: Click "Apply Filter" to update the visual. It will now display only the top or bottom N items based on the specified value. We can see that only top three values are filtered.
