Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mj2024
Helper II
Helper II

Change sort order in a slicer

Hi

I have a slicer that selects which data series to plot.  The order of the data series in the slicer is not in an order I like:

Screenshot 2024-12-25 201010.png

 

It should read Relative 20 then Relative 50 then Relative 100.  Here is the measure:

 

 

Relative Data Selector = 
DATATABLE(
"DataSource", STRING,
{
{"Relative 20"},
{"Relative 50"},
{"Relative 100"}
}
)

 

 

 

The order in the measure is correct but the slicer is sorting it in a way I don't like.  Is there a way for the slicer to follow the order I am looking for?

Thank you

 

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

One of ways is to create a sort column, something like below, and then select the DataSource column, and sort it by the sort-column.

Please check the below picture and the attached pbix file.

 

DATATABLE function - DAX | Microsoft Learn

 

Relative Data Selector =
DATATABLE (
    "DataSource", STRING,
    "Sort", INTEGER,
    {
        { "Relative 20", 1 },
        { "Relative 50", 2 },
        { "Relative 100", 3 }
    }
)

 

Jihwan_Kim_0-1735186954081.png

 

Jihwan_Kim_1-1735187129942.png

 

Jihwan_Kim_2-1735187164968.png

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

One of ways is to create a sort column, something like below, and then select the DataSource column, and sort it by the sort-column.

Please check the below picture and the attached pbix file.

 

DATATABLE function - DAX | Microsoft Learn

 

Relative Data Selector =
DATATABLE (
    "DataSource", STRING,
    "Sort", INTEGER,
    {
        { "Relative 20", 1 },
        { "Relative 50", 2 },
        { "Relative 100", 3 }
    }
)

 

Jihwan_Kim_0-1735186954081.png

 

Jihwan_Kim_1-1735187129942.png

 

Jihwan_Kim_2-1735187164968.png

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you @Jihwan_Kim .  It works!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors