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! Learn more

Reply
Nyakwezi
Frequent Visitor

Dynamic ordering of a matrix column based on slicer selection

Hi all,

 

Does anyone know how to dynamically order the columns in a matrix table?\

e.g.

I have a disconnected customer slicer which I use to select a specific customer and highlight their column (as seen in the picture below) 

I would like to be able to order the matrix table so that the customer selected appears first in the matrix table and all the other customers appear after

Nyakwezi_2-1705088949467.png

 

 

 

2 REPLIES 2
Nyakwezi
Frequent Visitor

thanks @amitchandak 
For the C1 Sort switch statement - I have about 1000 customers.

For the example I showed, customer F  was selected in the slicer and therefore I needed Customer F to appear first but there is a scenario where Customer 1000 might be selected in the slicer.

 

 

amitchandak
Super User
Super User

@Nyakwezi , Create two new columns in your table. Assume field on column matrix is C1

 

C1 New  = [C1]

 

C1 Sort = Switch([C1],

"F",1,

"A",2,

"B",3,

"C",4,

"D", "5",

10)

 

and mark C1 Sort as sort of C1 New and Use C1 new in visual . C1 new is created to avoid circular reference

 

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.