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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
LuisNC
Helper I
Helper I

Modify position of the column headers in a matrix

Hello Dear Community,

I am creating a Matrix with conditional formatting, as below:

LuisNC_0-1689785299376.png

 

And I would like to format the matrix so that all the squares have the same height and width.

To create the matrix I am following this example:

LuisNC_1-1689785534438.png

And I can see that in the example the squares are perfect because the column titles are set in a vertical format, not horizontal.

The example is created using Python, and I'm not sure if Power BI offers this feature.

Could you please give me a hand?

Many thanks in advance 🙂

 

 

1 ACCEPTED SOLUTION

sure. 

 

1. Suppose you have column headers like VeryLargeHeader1, VeryLargeHeader2 instead of this large name just put . (or any sign) you can double click on the name that you want to rename. Then, visually your column headers are small. so here is the trick. Insert a rectangle shape(my mistake for text box, actually it should be a shape) and add the column header value. you need to repeat this step for every column header. 

 

this video might be of help. 

 

2. I forgot the way in the new UI. but there is a way. you can drag the column to adjust the size. you need to hover at the corner of the column header, you will see a different icon. drag it. it will resize. 

 

and in the format option, you can adjust the row padding. 

rubayatyasmin_0-1689790647265.png

 

and you turned it, nothing changed visibly. but if you have large values than the column width, it wont auto adjust. 

 

 

hope this helps. 

 

If my assistance helped you in any way, hit 👍

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


View solution in original post

6 REPLIES 6
LuisNC
Helper I
Helper I

Thank you @rubayatyasmin , I'm on the way to success 😛

LuisNC_0-1689855047526.png

I created a new column with the dax function left to extract the 2 first characters of each attribute name.

I shortened the words like that. Then I adjusted the column width dragging as you adviced.

Then I set the font color of the column headers as white.

And now I'm going to work on the shape trick to add the coumn names in vertical format.

I think we've pretty much solved the challenge 🙂

I appreciate your help very much!

Regards,

Luis

@LuisNC thank you for your kind words. Happy to help. 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


LuisNC
Helper I
Helper I

Thank you very much @rubayatyasmin ,

It is much clear now, the only think I can't figure out is:

"you can double click on the name that you want to rename."

Not sure if you mean to double click in the column name to rename. If so, I tried and it doesn't work: if I click once, the column highlights:

LuisNC_0-1689852909113.png

And if I click twice it goes back to the original state of the visual (no highlight).

Could you please help me? 🙂

Thank you very much!

LuisNC
Helper I
Helper I

Hello @rubayatyasmin ,

Thank you very much for your reply.

I am pretty new to Power BI so I have a few doubts about your answer.

I didn't understand the first part:

"as of my knowledge, there is no such option in PBI to make column header vertical. But here is the trick. 

how about you rename your column headers from format pane, keep a . and then you use text box to show your column header vertically. This is a repetitive work but it will be helpful. As your column headers are static. "

I am sure it is perfectly understandable, but not for me unfortunately 🙂 could you please explain it further?

About:

"Adjust the Column width to make columns wider or narrower until you achieve the desired aspect ratio."

I have not been able to find this option, could you please show me a screen shot?

And regarding:

"If you want to make the headers horizontal, navigate to the "Row headers" section under the "Format" panel and turn off "Auto-size column width""

I turned the option off, but nothing really happened when I did:

LuisNC_0-1689789432278.png

Many thanks in advance 🙂

 

 

sure. 

 

1. Suppose you have column headers like VeryLargeHeader1, VeryLargeHeader2 instead of this large name just put . (or any sign) you can double click on the name that you want to rename. Then, visually your column headers are small. so here is the trick. Insert a rectangle shape(my mistake for text box, actually it should be a shape) and add the column header value. you need to repeat this step for every column header. 

 

this video might be of help. 

 

2. I forgot the way in the new UI. but there is a way. you can drag the column to adjust the size. you need to hover at the corner of the column header, you will see a different icon. drag it. it will resize. 

 

and in the format option, you can adjust the row padding. 

rubayatyasmin_0-1689790647265.png

 

and you turned it, nothing changed visibly. but if you have large values than the column width, it wont auto adjust. 

 

 

hope this helps. 

 

If my assistance helped you in any way, hit 👍

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


rubayatyasmin
Super User
Super User

Hi, @LuisNC 

 

as of my knowledge, there is no such option in PBI to make column header vertical. But here is the trick. 

how about you rename your column headers from format pane, keep a . and then you use text box to show your column header vertically. This is a repetitive work but it will be helpful. As your column headers are static. 

 

and to adjust the grids, 

  • In the "Grid" section. Here, you can adjust the Row padding to make the rows taller or shorter.
  • Adjust the Column width to make columns wider or narrower until you achieve the desired aspect ratio.
  • If you want to make the headers horizontal, navigate to the "Row headers" section under the "Format" panel and turn off "Auto-size column width"

 

and in python you can use rotation =90 to make vertical header. 

 

 

rubayatyasmin_0-1689517080227.png


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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