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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors