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
nb2310
New Member

How to change a Sort By Column in a Table based on selected value

 

I have a Table which shows the Top 5 Countries based on various values like Net Sales, Gross Margin, Net Profit, etc using Top N filter.

 

nb2310_0-1737030598581.png

 

Currently it is sorted by Markets name and I can change the sorted column des or asc when I select the column. But this method is static.

 

Is there a way to change the sorted Column based on the selected value? For ex. if I select NP $, can the table automatically sort by NP $ column descending? and then if I change selection to GM $, can the GM $ column in table be sorted descending?

 

I'm new to Power BI so any answer will be helpful! Thanks!

1 ACCEPTED SOLUTION
POSPOS
Post Partisan
Post Partisan

@nb2310  - Have you used buttons for the Top 5 Markets by: ?  If yes, you can create 5 different tables then use bookmarks for each of the buttons. Each table will be sorted by default on the respective measures.
Eg : Table 1 will be sorted by NS $, Table 2 will be sorted by GM $ etc.... This way, when you select on any button, they will be sorted accordingly

 

POSPOS_0-1737034353387.png

 

View solution in original post

2 REPLIES 2
nb2310
New Member

Thank You!

POSPOS
Post Partisan
Post Partisan

@nb2310  - Have you used buttons for the Top 5 Markets by: ?  If yes, you can create 5 different tables then use bookmarks for each of the buttons. Each table will be sorted by default on the respective measures.
Eg : Table 1 will be sorted by NS $, Table 2 will be sorted by GM $ etc.... This way, when you select on any button, they will be sorted accordingly

 

POSPOS_0-1737034353387.png

 

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.

Top Solution Authors