Forum Discussion

nb2310's avatar
nb2310
New Member
1 year ago
Solved

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.

 

 

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!

  • 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

     

     

2 Replies

  • POSPOS's avatar
    POSPOS
    Icon for Post Partisan rankPost 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