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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
LauraBueno
Helper III
Helper III

Sort slicer by column

Hi everyone,

 

I have created a slicer that lists the study names I have loaded in power bi. I'm trying to sort the slicer using a column within the table used to build the slicer called 'id'.

 

For that purpose, I have gone to the modelling tab and selected the 'id' column and click sort by column. However it seems the slicer is not affected and still shows the items alphabetically.   Also, the tables are in direct query mode, in case it makes any difference.

 

Can anyone please help me ?

 

thanks a lot in advance!

 

Best regards

Laura

1 ACCEPTED SOLUTION

hi  @LauraBueno 

For your case, you should selected "study names" filed then click sort by column and choose 'ID'.

By the way, here is a blog for you refer to:

https://radacad.com/sort-by-column-in-power-bi

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@LauraBueno , As long both column as same granularity you can do

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

I have done for Direct query :https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-1-Time-Intell...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak ,

 

Thank you for your message. However, I still have the same issue.

 

For the first link you shared, I dont see the option of "sort by" within the slicer, maybe that works only for certain graphs?

 

As for the second link, I had already created a column and used it to sort the entire table using that column however the slicer doesn't seem to be affected by it and still displays the items alphabetically.

 

Any ideas of how to make it work?

 

thanks

Laura 

hi  @LauraBueno 

For your case, you should selected "study names" filed then click sort by column and choose 'ID'.

By the way, here is a blog for you refer to:

https://radacad.com/sort-by-column-in-power-bi

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @v-lili6-msft ,

 

many thanks for your reply! That worked nicely 🙂

 

Just a small question related to that, how could I do the same but order the items in desceding id order? I tried clicking twice in order column but doesn't seem to make a difference.

 

Many thanks in advance,

 

best regards

Laura

Can you share sample data and sample output.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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