Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I am having trouble getting my matrix to sort based on a selected value from the slicer. For example, if the selected value is "Base Salary" then I would like the base salary column to be sorted in DEC order and the same idea with the Tota Salary column. The drill-down of the matrix is [Job Title] -> [Name], I would like it to only sort the Job title
Thank you in advance!
Hi @Anonymous ,
Can you try to directly click the small arrow below to control whether the column is in reverse or positive order.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , You can create two ranks measure or vars
Rank1 = RANKX(ALL(Table[Job Title]), [salary])
Rank2 = RANKX(ALL(Table[Name]), [salary])
Switch rank = Switch( True() ,
isinscope(Table[Name]) , [Rank2],
isinscope(Table[Job Title]) , [Rank1],
blank()
)
Hi amitchandak! Thanks for your quick response,
I tried this just now, It is not working when I have the [Name] field as the second level to the heiarchy. Am I missing something?
@Anonymous ,
Switch rank = Switch( True() ,
isinscope(Table[Name]) , [Rank2],
isinscope(Table[Job Title]) && not(isinscope(Table[Name]) ) , [Rank1],
blank()
)
Unfortunately, this is not working either...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 119 | |
| 100 | |
| 72 | |
| 69 | |
| 65 |