What is Top N Filter in Power BI?

Cody Schneider••8 min read

Your Power BI report shows every single product, campaign, and sales rep, but busy dashboards often obscure the most important information. You really just need to see what's actually driving results - like your top 10 products by revenue or your 5 best-performing ad campaigns. This article will walk you through exactly how to do that using the Top N filter, a powerful feature for cleaning up your reports and focusing on the data that truly matters.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What Exactly is a Top N Filter?

Think of the Top N filter as a bouncer for your data visualizations. Its job is to look at a list of items and only let the most important ones through, based on a specific value you define. The "N" simply represents a number. So, a "Top 10" filter shows the ten items with the highest value, "Top 5" shows the five highest, and so on.

For example, if you have a bar chart showing sales for all 200 products in your Shopify store, the chart would be crowded and difficult to read. Applying a Top N filter allows you to instantly change that chart to show only the Top 10 products by Sales Amount.

This is incredibly useful for common business questions like:

  • What are our top 15 best-selling products this quarter?
  • Which 5 marketing channels are driving the most website traffic?
  • Who are our top 3 sales representatives by closed deals?
  • Which 10 countries generate the most revenue?

The filter lets you hone in on the winners so you know what's working and where to focus your efforts.

How to Apply a Top N Filter in Power BI: A Step-by-Step Guide

Applying a Top N filter is straightforward once you know where to look. Let's walk through a common scenario: finding your top 5 products by total sales. For this example, we'll assume you have a bar chart visual that shows Product Name on the axis and Sales Amount as the value.

Right now, your chart probably looks cluttered, showing every single product. Let's fix that.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step 1: Select Your Visual and Open the Filters Pane

First, click on the chart or table you want to filter. This makes it the active visual. Once selected, look to the right side of your screen for the Filters pane. If it's collapsed, just click the little arrow to expand it. You'll see filters that are being applied to this visual.

Step 2: Find the Field You Want to Filter

In the Filters pane, you’ll see the fields that make up your visual listed under "Filters on this visual." In our example, you'd see Product Name and Sales Amount. Since we want to display a list of top products, we need to apply the filter to the Product Name field. Click the small dropdown arrow next to "Product Name" to expand its options.

Step 3: Change the Filter Type to "Top N"

By default, the filter type is set to "Basic filtering," which lets you manually check boxes for each item. We need to change this. Click on the "Filter type" dropdown menu and select Top N from the list.

This will change the options in the filter card, giving you everything you need to set up the ranking.

Step 4: Define Your "Top" or "Bottom" and Set "N"

You’ll now see a "Show items" section with two choices:

  • Top: Shows the highest-ranking items.
  • Bottom: Shows the lowest-ranking items (useful for finding underperforming products or campaigns).

Keep this set to Top. Right next to it is a text box where you enter your "N." Since we want to see the top 5 products, type 5 into this box.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 5: Drag in Your "By Value" Field (The Most Important Step!)

This is the step that trips many people up. Power BI knows you want the top 5 products, but it doesn't know what metric to rank them by. Is it top 5 by profit, units sold, or sales revenue? You have to tell it specifically.

You'll see a box labeled "By value." Go back to your Fields list, find your sales metric (in this case, Sales Amount), and drag it into this "By value" box. A common mistake is to skip this step, which makes the filter not work as expected.

Step 6: Apply the Filter

Once you've set the "Top," entered your number (5), and dragged your metric into the "By value" box, you simply click the "Apply filter" button at the bottom of the filter card.

Instantly, your cluttered chart will refresh to show only the 5 products with the highest sales amount. It's clean, readable, and immediately actionable.

Taking It Further: Creating a Dynamic Top N Filter

A static Top N filter is great, but what if you want to let your team or clients choose if they see the Top 5, Top 10, or Top 20 performers without you having to build separate reports? You can create a dynamic filter using a parameter. This adds an interactive slicer to your report for a much better user experience.

Here’s a quick overview of how to set it up:

1. Create a Numeric Range Parameter

In the Power BI ribbon, go to the Modeling tab and click New parameter. A window will pop up. Configure it as follows:

  • Name: Give it a clear name, like "Top N Selector."
  • Data type: Whole number.
  • Minimum: Set a reasonable minimum, like 3.
  • Maximum: Set a maximum, like 20.
  • Increment: Set this to 1 for whole numbers, or a number like 5 to let users jump between Top 5, 10, 15, etc.
  • Default: Set a default value, like 10.
  • Ensure "Add slicer to this page" is checked.

When you click OK, Power BI automatically creates a new table with a DAX formula and adds a slicer to your report page. Users can now move the slider to pick a number between 3 and 20.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

2. Connect the Parameter to Your Filter

Now, we just need to tell our Top N filter to use the number from this new slicer instead of a fixed number.

  • Go back to your visual and open the Filters pane.
  • Expand the Top N filter card for your Product Name field.
  • Instead of typing a number like 5 in the box, you'll click the little function button (fx) to the right of it.
  • In the "Top" window that opens, select the measure that your parameter created. It will have a name like "Top N Selector Value".
  • Click OK.

Now, your visual is connected to the slicer! When a user drags the slider to "8," the chart will automatically update to show the Top 8 products. This simple trick makes your reports significantly more powerful and interactive.

Common Examples Across Business Functions

The Top N filter is not just for sales data. Here are a few ways other departments can use it to find clear insights:

  • Marketing Teams:
  • Operations Teams:
  • Finance Teams:

Mistakes to Avoid

The Top N filter is powerful, but a couple of common slip-ups can lead to confusing results. Be on the lookout for these:

  1. Forgetting the "By Value" Field: As mentioned, this is the #1 mistake. If you don’t tell Power BI which metric to rank by, the filter won't work correctly. Always double-check that you've dragged a value into this box.
  2. Using the Wrong Value: Make sure the metric in the "By value" box truly represents what you want to measure. For instance, filtering for the "Top 10 products," but dragging "Customer Count" instead of "Sales Amount" into the box would give you a list of products bought by the most people, not the ones generating the most revenue.
  3. Losing the Big Picture: Focusing only on top performers is great for optimization, but don't forget to occasionally look at the overall data. Sometimes an important trend is happening with new, up-and-coming products that haven’t broken into the top 10 yet.

Final Thoughts

The Top N filter is a fundamental tool for anyone looking to build better, more focused reports in Power BI. By clearing away the noise, you can direct everyone's attention to the high-impact data points that fuel smarter decisions, whether you're analyzing sales figures, marketing engagement, or operational performance.

Learning tools like Power BI is an incredibly valuable skill, but often the real bottleneck is getting all your data connected and clean in the first place. Tying together Shopify sales, Google Ads performance, and Facebook campaign data often means hours of manual report pulling before you can even start building visualizations. That's why we created Graphed. Our approach lets you connect all your data sources in a few clicks, then create entire dashboards just by describing what you need in plain English - like, "Show my top 10 campaigns by revenue from all ad platforms last month." We build the dashboards for you automatically, so you can spend less time wrangling data and more time acting on it.

Related Articles