Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hello Dear Community,
I am creating a Matrix with conditional formatting, as below:
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:
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 🙂
Solved! Go to 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.
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 👍
Proud to be a Super User!
Thank you @rubayatyasmin , I'm on the way to success 😛
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.
Proud to be a Super User!
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:
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!
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:
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.
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 👍
Proud to be a 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,
and in python you can use rotation =90 to make vertical header.
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |