Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

New Member

Move Column Headings In Matrix - Power Bi Desktop



I am really struggling to move my headings in the matrix below.  As you can see this needs to be sorted in the correct format but I am unable to find a way to do this.  Any help would be greatly appreciated.



Community Champion
Community Champion

Hi @IainPowerBI 


Did you create your "groups" in Power Query, Calculated Columns or via the Group tool?


The end result you need is to create a rank for each of the group's you have created.   Below is a Calculated Column you can use for this. Just add the Group Names, followed by the rank order (i.e. 1, 2, 3, 4, 5.... ) and on the last one, ensure you end it with " , 0 ) "


Rank = 

TRUE () ,
'Table'[Group] = "0" , 1 ,
'Table'[Group] = "1" , 2 ,
'Table'[Group] = "2" , 3 ,
'Table'[Group =
"3-5" , 4 ,
'Table'[Group = .... ,

Once you do this, you can then click on your Group button in the Field pane and go to the Sort By Column button in the ribbon.  Sort by the new Rank column, and you're done 🙂


All the best!



If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?

Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors