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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
maverickf17
Helper I
Helper I

Header sort in Matrix visual

Hi All, does anyone know how to sort the column header is the below matrix.
It should be like 100%, 70%, 50% and then 40%.

maverickf17_0-1757856100520.png

The Columns what I have used:

maverickf17_1-1757856188515.png
--------------------------------------------------------------------------------------------

I would appreciate if anyone can do the visual sorting and attach a pbix file.

Thank you,
Maverick

 

1 ACCEPTED SOLUTION

@maverickf17 

 

Hi, there's a circular dependency when you try to sort by Burn_Bucket by Sort Order, because in this table you have another column 'Burn Bucket' that depends on a measure [A_Actual_burn_%] which might create a loop. 

 

I'd suggest creating a SortOrder table manually since it is quite small and connect it to your 'A_Backend_aggregation' with one-to-many, sort by this 'Burn_Bucket' by 'SortOrder' in this new table and use Burn_Bucket from this new SortOrder table for your Matrix visual. 

MasonMA_0-1757865149826.png   MasonMA_1-1757865374904.png

 

https://drive.google.com/file/d/1tBzw_T1ZIHgh30cvzzGsbPm3K_oG_dZH/view?usp=sharing

View solution in original post

7 REPLIES 7
v-saisrao-msft
Community Support
Community Support

Hi @maverickf17,

We haven’t heard back from you in a while regarding your issue. let us know if your issue has been resolved or if you still require support.

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @maverickf17,

Checking in to see if your issue has been resolved. let us know if you still need any assistance.

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @maverickf17,

Have you had a chance to review the solution we shared by @alish_b @MasonMA @DataNinja777 ? If the issue persists, feel free to reply so we can help further

 

Thank you.

maverickf17
Helper I
Helper I

Hi @DataNinja777 ,
I tried this approach.
It's not working.
Pease find the link of the pbix file.
https://www.dropbox.com/scl/fi/swkvtqqi41nyab4y8ids6/Cash-Burn-Final-Arjun-IRL-291-6-DESKTOP-OFTK3GM... 
---------------------------------
Please refer page number : Main_15-09-2025.

Thanks,
Maverick



Hi @maverickf17 ,

As @MasonMA  mentioned, there will be a circular dependency issue when you try to sort the Burn_Bucket column by SortOrder field (SortOrder depends on the Burn_Bucket for SWITCH operation and Burn_Bucket depends on SortOrder for sorting). A quick way to overcome the circular dependency is to create a copy of Burn_Bucket, sort this new field by SortOrder and use this field in the visual instead. As PowerBI will treat this as a separate entity, you will not get the circular dependency issue.

alish_b_1-1757912171110.png 

alish_b_2-1757912214501.png

Well this being said, this is a quick one-off solution and only to be used if you do not want an extra table in your data model. The method described by @MasonMA is a more professional way to tackle this scenario and it will add an extra table in your data model though (do use DATATABLE to create this table instead of manually entering data so that you can edit the fields and logic easily in the future).


Hope it helps!

 

 

@maverickf17 

 

Hi, there's a circular dependency when you try to sort by Burn_Bucket by Sort Order, because in this table you have another column 'Burn Bucket' that depends on a measure [A_Actual_burn_%] which might create a loop. 

 

I'd suggest creating a SortOrder table manually since it is quite small and connect it to your 'A_Backend_aggregation' with one-to-many, sort by this 'Burn_Bucket' by 'SortOrder' in this new table and use Burn_Bucket from this new SortOrder table for your Matrix visual. 

MasonMA_0-1757865149826.png   MasonMA_1-1757865374904.png

 

https://drive.google.com/file/d/1tBzw_T1ZIHgh30cvzzGsbPm3K_oG_dZH/view?usp=sharing

DataNinja777
Super User
Super User

Hi @maverickf17 ,

 

You can resolve the sorting issue in your Power BI matrix visual by creating a dedicated sorting column. The problem occurs because Power BI is sorting the column headers as text, where "100%" comes before "40%" alphabetically. To fix this, you need to provide a numerical column to define the correct sorting sequence.

First, you'll need to create a new calculated column in your data table using a DAX formula. This column will assign a numeric value to each of your percentage categories, which will then be used to order them correctly. Navigate to the Data view in Power BI, select the appropriate table, and create a new column with the following DAX expression. Remember to replace 'YourTable'[Percentage Category] with the actual name of your table and column.

Sort Order =
SWITCH(
    TRUE(),
    'YourTable'[Percentage Category] = "100%", 100,
    'YourTable'[Percentage Category] = "70%", 70,
    'YourTable'[Percentage Category] = "50%", 50,
    'YourTable'[Percentage Category] = "40%", 40,
    0
)

After creating this new Sort Order column, you must apply this logic to your original percentage column. While still in the Data view, select the column that contains the text percentages (e.g., "100%", "70%"). Then, go to the Column tools tab in the ribbon and click on the Sort by Column option. From the dropdown menu that appears, choose the Sort Order column you just created.

Finally, return to the Report view and adjust the sorting directly on the matrix visual. Select your matrix, click the ellipsis (...) in the top-right corner, and choose to sort by your percentage category column. To achieve the desired order of 100%, 70%, 50%, and 40%, make sure the sort direction is set to descending. This will arrange the columns in the correct numerical sequence instead of the default alphabetical one.

 

Best regards,

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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