How to Show Top 3 Values in Power BI

Cody Schneider

Trying to highlight your top-performing products, regions, or salespeople in a Power BI report can feel surprisingly tricky. You just want to show the top 3 items, but finding the right setting isn't always obvious. This guide will walk you through two effective methods to display the top 3 values in any Power BI visual, from a simple filter to a more powerful DAX formula.

Why Isolate Top Values in Your Reports?

Before jumping into the "how," it's helpful to understand the "why." Focusing on top performers (often called a "Top N" analysis) is a fundamental part of data reporting. It cuts through the noise and helps you and your team focus on what matters most. Instead of presenting a chart with 50 different products, highlighting the top 3, 5, or 10 gives viewers an immediate and actionable insight.

This is useful for answering questions like:

  • Which three marketing campaigns are driving the most revenue?

  • Who are our top-performing sales representatives this quarter?

  • What are the top three best-selling products in our Shopify store?

  • Which countries generate the most website traffic according to Google Analytics?

By filtering your visuals to show only the most impactful items, you create cleaner, more effective dashboards that guide decision-making instead of overwhelming your audience with data. Now, let's look at how to actually do it in Power BI.

Method 1: Using the "Top N" Visual Filter

The simplest way to show your top 3 values is by using the built-in filtering feature in the Power BI interface. This method doesn't require any code and can be applied to almost any visual in just a few clicks. It's the perfect approach for quick reports and one-off analyses.

Let's walk through an example. Imagine you have sales data and you want to create a bar chart showing your top 3 best-selling products.

Step-by-Step Instructions:

1. Create Your Visual

First, create a visual you want to filter. A bar or column chart works great for this. Place the category you want to rank (e.g., "Product Name") on the Y-axis and the value you want to rank by (e.g., "Total Sales") on the X-axis.

At this point, your chart will show all your products, which might look crowded and difficult to read.

Example: Your bar chart initially shows sales for every single product, making it hard to spot the top performers at a glance.

2. Open the Filters Pane

With your visual selected, look for the Filters pane, which is typically located to the right of your report canvas. You will see filters for the fields you've used in your visual.

3. Select the Field to Filter

In the Filters pane, find the card that corresponds to the category you want to filter. In our example, this would be the "Product Name" field. Click the small arrow on that card to expand its settings.

4. Change the Filter Type to "Top N"

By default, the filter type is set to "Basic filtering." Click the dropdown menu that says "Basic filtering" and select "Top N" from the list. This will change the options available on the filter card.

5. Configure the Top N Filter

Now you'll see a few new options:

  • Show items: Keep this set to "Top."

  • Number box: In the box next to "Top," type the number of items you want to see. For this example, type 3.

  • By value: This is the most important step. You need to tell Power BI how to determine the top 3. Drag the numeric field you're measuring (in this case, "Total Sales") from the "Fields" pane into the "Drag data fields here" box under "By value."

6. Apply the Filter

Once you’ve set the options, click the "Apply filter" button at the bottom of the card. Your visual on the report canvas will instantly update to show only the top 3 products based on their total sales. Success!

Pros and Cons of the Top N Filter Method

  • Pros: It’s incredibly fast, easy to use, and requires zero coding knowledge. It's the best option for beginners or anyone needing a quick result.

  • Cons: The filter is tied to a single visual. If you want to show the top 3 values in several different charts, you'll have to repeat these steps for each one. It's also less flexible if you need to use this ranking in other calculations.

Method 2: Using a DAX Rank Measure

For more control, flexibility, and reusability, you can use DAX (Data Analysis Expressions), Power BI's powerful formula language. This approach involves writing a measure that calculates the rank of each item. While it has a slightly steeper learning curve, it unlocks much more analytical capability.

The core of this method relies on the RANKX function. This function evaluates a value against a list of other values and returns its rank. By creating a rank measure, you can then use it to filter any visual in your report.

Step-by-Step Instructions:

1. Create a "Total Ad Spend" Base Measure (If Needed)

Before a rank is calculated, it is very important that you use a base measure to tell the Power BI DAX engine what value is being used for the calculation. DAX operates much better when it uses measures vs columns in its calculations as it is better for the performance of the model.

For Total Ad Spend it would be simply:

2. Create a New Measure for the Rank

Navigate to the "Modeling" tab in the Power BI ribbon and click "New Measure". This will open the formula bar where you can write your DAX formula.

We'll use the RANKX function. Let's create a measure to rank campaigns based on ad spend. The formula will look like this:

Let's break down what this formula does:

  • RANKX(...): This is the ranking function.

  • ALL('Facebook Ads'[Campaign Name]): This creates a table of all unique campaign names, ignoring any filters—ensuring each campaign is ranked against every other campaign.

  • [Total Ad Spend]: This is the measure we're ranking by.

  • DESC: Ranks from highest to lowest.

  • Dense: Ensures that tied values don't skip rank numbers.

3. Test Your Rank Measure in a Table

Create a new Table visual on your report canvas. Add your category ("Campaign Name"), your value ("[Total Ad Spend]"), and your new "[Campaign Rank]" measure. Sort the table by "Ad Spend." You should see a numbered rank next to each campaign name.

4. Apply the Rank Measure as a Filter

Now you can use your rank measure to filter your bar chart or any other visual. Select the chart, go to the Filters pane, and perform these steps:

  1. Drag your new "[Campaign Rank]" measure into the "Add data fields here" section of the filters for this visual.

  2. Change the filter condition to "is less than or equal to".

  3. Enter 3 in the input box.

  4. Click "Apply filter."

Your visual now updates to show only the campaigns with rank 1, 2, or 3. The best part? You can drag the [Campaign Rank] measure onto any other visual to apply the same filter without rewriting logic.

Pros and Cons of the DAX Method

  • Pros: It's reusable across your entire report, gives you precise control over ranking logic, and the rank itself can be used in other calculations (e.g., to calculate sales for only the Top 3 products).

  • Cons: It requires writing DAX, which can be intimidating for new users. The initial setup takes more steps than the visual filter method.

Which Method Should You Use?

Choosing between the visual filter and the DAX measure comes down to your specific needs and comfort level with Power BI.

  • Use the "Top N" filter if: You need a quick result for a single chart, are newer to Power BI, or don't foresee needing to reuse the ranking logic elsewhere.

  • Use a DAX RANKX measure if: You need to apply the Top 3 logic to multiple visuals, plan to use the rank in other formulas, or require more complex ranking scenarios (e.g., ranking within categories).

Mastering both techniques will equip you to handle almost any "Top N" request that comes your way, turning cluttered reports into focused, high-impact dashboards.

Final Thoughts

Whether you use the quick Top N filter or build a more robust DAX measure, identifying your top performers is a critical step in building actionable reports. These methods give you the control to cut through the data clutter and highlight the insights that truly drive your business forward.

Of course, sometimes the setup required in tools like Power BI is more than what's needed for a simple question. We built Graphed to simplify this entire process. Instead of managing filters or writing DAX formulas, you can connect your data sources and just ask, "Show me my top 3 campaigns by ad spend in a bar chart." Our AI builds the visualization for you instantly, turning hours of report building into a 30-second conversation and giving you back time to focus on strategy.