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
Anonymous
Not applicable

Matrix Column Head Order

Matrix Column Heads.jpg

 

Is there a way to change the order of the column heads in a Matrix table.  Currently it displays in alphabetical ascending order.  I would like to reverse that if possible.  A prefered option would to be able to put it in a custom order.  Are either of these options available?

1 ACCEPTED SOLUTION
v-haibl-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

We can do that with following steps. Assuming we have a table like below. We can add a reverse index.

Matrix Column Head Order_1.jpgMatrix Column Head Order_2.jpg

 

Close and apply Query Editor, select the Type column and make it sort by column of Index.

Matrix Column Head Order_3.jpg

 

Now the order of the column heads will follow the Index.

Matrix Column Head Order_4.jpg

 

If you want to put it in a custom order, you can customize the index yourself. For example, you can create a conditional column in Query Editor.

Matrix Column Head Order_5.jpgMatrix Column Head Order_6.jpg

 

Best Regards,

Herbert

View solution in original post

30 REPLIES 30
Anonymous
Not applicable

This solution is incorrect

Anonymous
Not applicable

Is there a way to implement this when in Direct Query mode? I had it working in import mode, but now the needs of my project have required direct queries

I don't think this exists as of yet.  I have been searching for a while. I even created my query to sort so that data would come into the query editor window in the proper chronologic order like this, 

 

  order by case when [Month] like '%Jan%' then 1
					   when [Month] like '%Feb%' then 2
					   when [Month] like '%Mar%' then 3
					   when [Month] like '%Apr%' then 4
					   when [Month] like '%May%' then 5
					   when [Month] like '%Jun%' then 6
					   when [Month] like '%Jul%' then 7
					   when [Month] like '%Aug%' then 8
					   when [Month] like '%Sep%' then 9
					   when [Month] like '%Oct%' then 10
					   when [Month] like '%Nov%' then 11
					   when [Month] like '%Dec%' then 12
					   end 

Still nada! If this isn't a suggestion for an improvement, I don't know what is. Smiley Tongue

Anonymous
Not applicable

I solved it by sorting by another column that I called date order

@Anonymous

 

Hey I agree there are work arounds.  I solved it the same way.  Most things MS are Drag and Drop and I am hoping to usher that same motif into life here. 

 

Thank you for a great suggestion!  

Thanks. This worked out perfectly.

Anonymous
Not applicable

Thanks Herbert...this should help quite a bit!

 

Tim

BhaveshPatel
Community Champion
Community Champion

Hi There,

 

You can drag your column fields in matrix visuals up and down to see the expected result.

 

 

Thanks & Regards,

Bhavesh

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Hi there,

can you please share some screenshot for this, thanks in advance

Anonymous
Not applicable

Bhavesh,

 

 

The columns are not seperate categories in different columns...as shown below they are retailers all contained in one data tables column.

 

 Retailers.jpg

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.