Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

How to Sort Slicer By Measure in Power BI?

A sales manager opens a regional performance dashboard before the weekly review. The Region slicer lists East, North, South, and West in alphabetical order. That works, but it hides the story: West generated the highest sales this month, while East needs immediate attention.

I have run into this situation often when converting Excel reports into interactive Power BI dashboards. Users want slicers to show the most important products, salespeople, customers, or regions first—not simply follow alphabetical order.

This guide shows how to sort slicer by measure in Power BI, explains the native limitation, and walks through a practical workaround you can use in a real sales dashboard.

Can You Sort a Slicer by Measure in Power BI?

The short answer is no: a standard Slicer visual does not dynamically sort its items by a Measure. A measure calculates a result based on the current filter context, while slicer values come from a column in your data model.

For example, assume your retail company has four regions:

RegionTotal Sales
West$245,000
North$188,000
South$156,000
East$92,000

A business user may expect the slicer to display West, North, South, and East. However, a normal slicer usually displays East, North, South, and West because it sorts the text values alphabetically.

This behavior matters because users often make decisions based on what they see first. If your highest-value region, product, or customer sits at the bottom of a long slicer, users may overlook it. In a client-facing sales dashboard, I prefer to put meaningful values at the top wherever possible.

There are two practical ways to handle this requirement:

  1. Create a fixed sort order with a calculated column when the ranking does not need to change with report filters.
  2. Use a table or matrix visual as a slicer-like selector when the order must respond to a measure dynamically.

The second option works best when users want to see the latest top-performing categories, regions, or products.

Pro Tip: I have found that many users ask for “sort slicer by measure” when they actually need a ranked selector. Clarify whether the order must change after users select a month, year, or product category. That answer determines the right design.

How to Sort a Slicer by Measure in Power BI

Let’s use a consistent example: a mid-sized retail company stores sales transactions in an Excel file. The company wants a report where users can select a sales region, but the highest-selling regions should appear first.

The Excel source includes a Sales table with these columns:

  • Order Date
  • Region
  • Product Category
  • Sales Amount
  • Order ID

After importing the file into Power BI Desktop, create a clean data model before building visuals. A data model defines how tables connect and how Power BI calculates results across those tables.

For a simple report, you might initially keep Region in the Sales table. In a production model, I recommend creating a separate Region dimension table. A dimension table stores descriptive values such as Region, Product, Customer, or Date. Your transaction table remains the fact table because it stores individual sales records.

You can learn more about writing and organizing calculations in this practical guide to Power BI DAX formulas.

Create the core sales measure

First, create the measure that drives the business logic.

  1. In the Fields pane, select the Sales table.
  2. Select New measure from the ribbon.
  3. Enter this DAX formula:
Total Sales = SUM(Sales[Sales Amount])
how to sort a slicer by measure in power bi

This measure adds all values in the Sales Amount column. Unlike a calculated column, it recalculates whenever users filter the report by region, month, category, or another field.

A measure such as