How to Show Top 10 in Power BI

Cody Schneider

One of the first things you'll want to do when analyzing data is to focus on what matters most. Whether you’re looking at top-selling products, most effective marketing campaigns, or a leaderboard for your sales team, isolating the top performers is a fundamental reporting task. This guide will walk you through several practical methods to show the top 10 results in your Power BI reports, from a simple filter to a more dynamic and powerful DAX approach.

Why Is Focusing on Top 10 (or "Top N") Useful?

Before jumping into the “how,” let’s quickly touch on the “why.” Reports that display hundreds or thousands of rows of data can be overwhelming and lead to analysis paralysis. Focusing your visuals on a "Top N" list (where N can be 5, 10, 20, etc.) helps you and your audience instantly spot key insights by:

  • Reducing Noise: Filtering out low-performers makes your charts and tables cleaner and easier to read.

  • Highlighting Impact: It quickly draws attention to the items that are having the most significant effect, whether positive or negative.

  • Improving Performance: Smaller, focused charts render faster and make your reports feel more responsive.

Method 1: Use the Filters Pane (The Easiest Way)

The most straightforward method for displaying the top 10 is built directly into Power BI's Filters pane. This approach is perfect for when you need a quick, static list without writing any code. Let's use an example where we want to see the Top 10 products by total sales.

Step-by-Step Instructions:

  1. Build Your Initial Visual: First, create the visual you want to filter. A simple Table or Bar Chart works well. For our example, create a bar chart, drag Product Name onto the axis, and Total Sales onto the values. You will initially see a long list of all your products.

  2. Select the Visual and Open the Filters Pane: Click on your visual to make sure it's selected. The Filters pane, usually located on the right side of the Power BI interface, will now show the fields being used in that specific visual.

  3. Find the Field to Filter By: In the Filters pane, find the field you want to use for ranking - in our case, Product Name. Click the small arrow to expand its options.

  4. Select the "Top N" Filter Type: Under "Filter type," you'll see a dropdown menu that likely defaults to "Basic filtering." Click it and choose Top N from the list.

  5. Configure the Top N Filter: The options will change to let you set up your top 10 list.

    • In the "Show items" dropdown, leave it on Top.

    • In the next box, type in the number 10.

    • Now for the crucial part: you need to tell Power BI how to determine the top 10. Drag your measure, Total Sales, from your Fields list into the "By value" box.

  6. Apply the Filter: Click the "Apply filter" button at the bottom of that field's settings. Your visual will instantly update to show only the 10 products with the highest total sales.

That's it! This method is perfect for static dashboards where the analysis needs are straightforward. The main drawback is that it's not dynamic - you can't easily change the "10" to a "5" or "15" without going back into the Filters pane to edit it.

Method 2: Create a DAX Measure with RANKX (The Powerful & Flexible Way)

If you need more control, want to use your rank in other calculations, or plan to let users dynamically change the "N" value, you'll want to use a DAX (Data Analysis Expressions) measure. The star of this show is the RANKX function. It might look intimidating at first, but it opens up a world of possibilities.

Using DAX gives you a reusable ranking calculation that exists independently of any single visual. This means you can use it to conditionally format rows, show rank as a value in a table, or create even more advanced logic.

What is RANKX?

The RANKX function scans a table and returns the rank of a specific expression. We'll use it to calculate a rank for each product based on its total sales.

How to Create a Rank Measure:

  1. Create a New Measure: In the "Home" or "Modeling" tab of the ribbon, click "New Measure."

  2. Enter the DAX Formula: In the formula bar that appears, type the following DAX expression. Let's assume your sales table is named 'Sales' and it has a 'Product Name' column and a measure for '[Total Sales]'.

  1. Understanding the Formula:

    • RANKX( ... ): This is the function we are using.

    • ALL('Sales'[Product Name]): This is the first argument and one of the most important. It tells RANKX to look at the entire list of all product names, ignoring any pre-existing filters on the visual (like a specific region being selected). This ensures you're ranking a product against all other products, not just the ones currently visible.

    • [Total Sales]: This is the second argument. It's the "expression" we want Power BI to evaluate for each product to determine its rank. In this case, rank them by their sales value.

How to Use the Rank Measure:

  • Add the new Product Rank measure to your Filters pane for the visual (drag it to the "Filters on this visual" section).

  • Set the filter condition to be "is less than or equal to" and enter the number 10.

  • Click "Apply filter."

Your chart will now show the top 10 products, but the method is far more robust. You can even add the Product Rank measure directly to a Table visual to explicitly show the rank of each product.

Method 3: Go Dynamic with a "What If" Parameter

Here’s where we combine the power of DAX with the interactivity of Power BI to let users choose what "Top N" they want to see. This is perfect for building flexible reports for your team.

Steps to Create a Dynamic Top N Selector:

  1. Create a "What If" Parameter:

    • Go to the "Modeling" tab in the ribbon and click "New parameter".

    • Configure it as follows:

      • Name: Top N Selector

      • Data type: Whole number

      • Minimum: 1

      • Maximum: 25 (or whatever makes sense)

      • Increment: 1

      • Default: 10

      • Make sure "Add slicer to this page" is checked.

    • Click "OK." Power BI will automatically create a new table with a measure (e.g., 'Top N Selector'[Top N Selector Value]) and a slicer on your report page.

  2. Create a Control Measure:

This measure checks if our previously calculated Product Rank is less than or equal to the value the user has selected with the slider.

  1. Apply the Final Filter:

    • Select your visual.

    • Drag the new Is in Top N measure to the "Filters on this visual" section.

    • Set the filter condition to "is" 1.

    • Click "Apply filter."

Now, any user viewing your report can use the slicer to instantly change the view from a Top 10 list to a Top 5, Top 20, or any other number you allowed in the parameter. This makes your report much more exploratory and engaging.

Final Thoughts

Mastering how to show Top 10 data in Power BI moves your reports from being simple data dumps to focused and insightful dashboards. Starting with the basic Filters pane is perfect for quick analysis, while learning the RANKX function in DAX unleashes incredible power and flexibility for creating dynamic and interactive user experiences.

Learning tools like Power BI is a powerful skill, but the journey to becoming proficient in DAX, data modeling, and report creation takes time. At Graphed we’re removing that complexity. By simply connecting your data sources and asking questions in plain English - like "show me my top 10 products by revenue in the last quarter as a bar chart" - we automate the entire process for you, turning hours of report building into a 30-second conversation. We handle the connections, manage the live dashboards, and give you the powerful insights without the steep learning curve.