cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
olopuc
Frequent Visitor

Is There any way to fix Column Widths in a Matrix

In a Matrix visualization, is there any way to fix the column widths so they don't change. Specifically, I have a matrix that has two Values per Column Item: 

 

Project 
CostUnit Rate 

 

I always want the Cost column to be one uniform size and the Unit Rate to be a different uniform size for each Project which then fixes the uniform width of the Project field. Power BI Desktop seems to retain the width values for each Project-Cost and Project-UnitRate Column independantly as I can have different widths for Project A vs Project B. That is correct, but as I ad new projects via data updats, then I (or the end user) needs to adjust each one as they come along. Shouldn't I be able to preset these values, presumably under the column formatting section?

 

Is there an easy way to do this (if so please let me know) or is this an enhancement that needs to be added at some point?

1 ACCEPTED SOLUTION

Hi @olopuc,

 

According to my test,

1. When the "auto-size" of "column headers" is off, the column will keep its length, which won't change automatically.

2. When the new data is added the first time, the column would fit its width automatically. 

3. First set "word wrap" on, then set "auto-size" off, it would satisfy your scenario.

 

Please have a try. 

 Is There any way to fix Column Widths in a Matrix2.jpg

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

19 REPLIES 19
androo
Helper I
Helper I

There are workarounds, like the one mentioned above, but, they are partial solutions at best and don't work in all (or enough) scenarios. MS really needs to provide something for this. It is immensely frustrating and an utter waste of "our" time, to have to fiddle around with a mouse getting columns in one or more matrix "visualisations" to line up. It really is so much easier in Power Pivot inside Excel and unless what you are working on needs to be published widely, I'd just use pivots in Excel derived from the data model where this is just so much quicker and more flexible. In Excel with PP you can set widths for multiple "visualisations" at once ("visualisations" are called Pivot Tables or Charts, there) . You can also set widths numerically and you are not restricted to having all columns the same width. Copies of pivots or returned Power Query tables can also inherit the same formatting even, I think, when you change the measure in the values. Power BI isn't the right tool for everything, though some managers now think it is because of the hype. I'm increasingly becoming aware of how much Power BI is focussed on the visuals, which is fine. But, getting the numbers and displaying them in an acceptable way is, I think, much faster in Excel Power Pivot where you have access to M Code (Power Query) and Dax (Power Pivot) just as you do in Power BI. There is a third-party tool, I think endorsed by MS, Dax Studio I think it's called, which may address some of this, but, for many of us working in corporate environments that means a struggle to get that app past your IT people and life is too short.

With regard to the MS site where you used to be able to add your voice to requests for changes or new features to MS Apps, I think that was moved sometime in 2020/2021. Shame they didn't leave a link to the new location, but, perhaps that's not an accident.

vladnicolau
Regular Visitor

It’s incredible how much I’ve struggled with this thing.

Here's my solution: I’ve just renamed my columns by adding empty spaces in the existing column name, for all my matrix columns. Example:

  • column name before: AB
  • column name after:       AB     

by using spaces, I could control the column width of all my columns (I’ve used word to add the number of spaces needed for every column, depending on the column’s name, so that in the end all columns have the same width.

 

Then I just switched the Auto-size column width to “On”

Now all my columns have the same size, finally.

best regards, Vlad.

Terp
Advocate II
Advocate II

4 years later and many of us are still sizing column widths by eye...across 20+ years of matrix data (well, trying to...won't compile 20 years of monthly data, but I digress).

 

 

Michael-PBI
Frequent Visitor

Hi,

 

Stumbled across this post when looking for a solution to fix column widths in a matrix visual. Seems this is still not supported, but we can vote for it at the PBI idea site:

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19568263-set-an-exact-column-widt...

 

Michael

Looks like they deleted it!  When I click on your link I get a "page not found" error.  To bad because this is still not possible 😞

Many thanks, Micheal. I voted and will also share with our community to vote for this feature.

Michael-PBI
Frequent Visitor

Hi,

 

Stumbled across this post when looking for a solution to fix column widths in a matrix visual. Seems this is still not supported, but we can vote for it at the PBI idea site:

 

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19568263-set-an-exact-column-widt...

 

Michael

odoro
Frequent Visitor

has anyone found a fix for this?  I have created a matrix that returns data for a rolling 12 week period.  The column header is the financial week number and the date of the last date of the financial week. 

 

Once I have published the report and the weeks roll over the column width loses the word wrap and takes on the full length of the text of the week header.

 

It is a fixed 12 column matrix and I need it to remain so but the header of the columns will change as the weeks roll over.   I need it to maintain the word wrap and fix the width.

odoro
Frequent Visitor

Word Wrap is ON and auto-size is OFF

v-jiascu-msft
Microsoft
Microsoft

Hi @olopuc,

 

Please set "Auto-size column size" to "off". It will work according to my test. Maybe you need to upgrade Power BI Desktop to the latest version (2.48.4792.721 64-bit (July 2017)).Is There any way to fix Column Widths in a Matrix.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This goes beyond the Auto-Size option.

 

Once Auto-Size is turned off, I am trying to understand how Power BI then determines the column size for new columns that are added to the matrix. So I might have 3 projects to start out with six total columns. I can set the size for each of those with the Auto-Size turned off. But the next time I refresh, two new projects are added which creates 4 new columns and I'm trying to figure out how these are sized. I don't want to have to force the end user to adjust column widths every time new information is added to the report.  In the data set I am using the Project field has a number and description component so it might look like this:

 

|12345 - Intercontinental Roadways Terminal #6|

|Cost          |   Unit Rate                                        |

 

and I want the columns to be collapsed so the Project always word wraps based on fixed widths for the Cost and Unit Rate columns:

 

| 12345 - Intercontinental | 45678 - Project B789       |

|  Roadways Terminal #6   |                                         |

| Cost             | Unit Rate   | Cost             | Unit Rate   |

 

I am pretty sure the functionality does not exist at this time, but I'm trying to confirm that because it is needed for the report I am designing. I wanted to see if there was any work around that might be available.

 

Hi @olopuc,

 

According to my test,

1. When the "auto-size" of "column headers" is off, the column will keep its length, which won't change automatically.

2. When the new data is added the first time, the column would fit its width automatically. 

3. First set "word wrap" on, then set "auto-size" off, it would satisfy your scenario.

 

Please have a try. 

 Is There any way to fix Column Widths in a Matrix2.jpg

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This does not work when using Date Hierarchy. The column widths change with the dates.

For example, if you have Year/Month and are showing a running 12 months; the next month will not be the same size as the column that was once there.

The only way I have been able to get around this is to set the column widths for the next 24 months. It retains the set widths when the months roll around.

From my testing, Setting the Auto-Size to off and the word-wrap to on, works but only at the top level column. If you have drilled-down, there does not seem to be a solution to fix the column width at this time.

This did not work for me as well.  Could this be because I'm using the on-premise version of Power BI (August 2018)?

Is there a way also to fix the "Row Headers" in a matrix?
Even if I fix the "Column Headers" the table still "jumps around" when drilling down in the rows.
TIA

 

Dale,

 

it´s not working in my case. I have a chart interconected with  slicer and a table stand alone. Anytime a change a month in the slicer my table is afected changing columns witdth. 

It not works in may case. I have a table that should show 3 months in columns, in another chart in same page there os another chart connected to a slicer where I can select details of an specific month. When I change the month throught the slice columns in the table change their width.

I can get this to work, but only if there is only one initial project in the list. Or else I think I have to set all of the projects to the same column widths (by eyesite it seems) and then the new ones will fall in line.

 

That does not seem very pratical. 

 

Also, it seems like the order in the selections of Word wrap and Autofit is crucial (though I did not rigourously try to confimr that).

 

Either way thanks for your help. At least I understand what seems to be involved and will consider suggesting a better work around.

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors