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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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 Patron
Post Patron

@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 Patron
Post Patron

@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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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