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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
johnmerm2
New Member

matrix column ordering with slicer

I have the following table (group,entity_name,entity_order,value)

I need to present as a matrix with entity_name as the column and value as the value - the matrix is always sliced by the group attribute

 

I need to sort the columns using the sort_order attribute.
Now my problem is that since for each group, the same entity_name may have a differnet entity_order, I cannot simply sort the entity_name column by the entity_order column as it will complain that there are mulitple values matching.

 

Any suggestions?

 

 

 

5 REPLIES 5
Anonymous
Not applicable

Hi @mostho ,
Based on your description and the data provided, first of all if you want to avoid duplicate sorting, you need a column that is the only one that can be sorted in order, and you can use the Context function to merge these so that they can be sorted again. The value column is missing in the number you provided, please provide complete data and your expected results, so that we can help you faster.

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Best regards,
Albert He

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

mostho
Helper II
Helper II

what if you change your entity_order (or make a entity_order2) in such a way that it contains the group?

Still doesn't work . The problem is that in this table

groupentity_nameentity_orderentity_order_2
Aa0A_0
Ab1A_1
Ba1B_1
Bb0B_0


There will be duplicates for a (A_0,B_1) and b (B_0,A_1)

SamWiseOwl
Super User
Super User

Hi @johnmerm2 

Would it be possible to duplicate the table in the Query Editor, delete the extra columns, remove duplicates.

Then in the front end join using the entity_name, on the unique table sort entity_name by entity_order.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

I'd need to do this when I change the group selection in the slicer

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.