Forum Discussion
Hide header row in table visual and set column widths
- 1 year ago
Hi Anon9876 , Thank you for reaching out to the Microsoft Community Forum.
No, Power BI does not currently allow you to force column headers to wrap independently of column width. Header text will only wrap when it exceeds the width of the column and there is no option to manually insert line breaks or enable force wrap behaviour. If the column is wide enough to display the entire header in one line, Power BI will not wrap it, even if wrapping had occurred previously when the column was narrower. The only way to restore wrapping is to reduce the column width until the text naturally wraps again.
If you're committed to using table visuals and want a vertically stacked layout that looks seamless, your current method of disabling auto-size, applying temporary wide number formatting to align columns and using formatting tricks to hide headers remains the only viable option in Power BI today. This approach, as described by alish_b , is valid for static reports where layout precision is essential and interactivity or filtering isn't central.
However, if you're open to restructuring your model for a more maintainable and dynamic report, danextian 's suggestion is the better long-term approach, using a matrix visual with either a disconnected table or calculation groups. This lets you display measures like Current Month and Year-To-Date as row items, eliminates the need for layered visuals or header hacks and aligns better with Power BI's native capabilities for grouping and formatting. It does take some setup, but it’s far more scalable and robust for evolving reporting needs.
Interesting!
First, the metrics don't seem to be dynamic so why not compute them in a disconnected table at refresh time? That will save you a lot of formatting (explained next).
Now into the world of workarounds. You could overlap the two visuals (maybe even rename the field titles of the bottom visual to '<Space>', remember this will mess up the width but that will be fixed next). Then, use the formatting option as below to determine the required length (which you will have to do for every measure/field and that does not stop there you will even have to revert them later)
Then head over to the Column header options for the visual and turn off Options>Auto-size width. This will ensure that the columns don't grow/shrink (messing up the illusion). Now revert the formatting options for the measures/fields to what they were before. ( I use this hack even in normal tables to get a consistent formatting.) That should do the trick (maybe you will have to mess around with the maintain layer order too in cases where the user clicks on the bottom table). But yes, if possible go with the first approach and save yourself from this formatting nightmare.
Hi alish_b. Thanks you for your response. I had turned off the auto-size option so that I could try to manually set the column width to get the word wrapped headers appearing the way I want them, but lining them up is difficult. I will try your suggestion of formatting the measures instead with the auto-size turned on.
I am not sure about the disconnected tables. How does that help? All the amounts shown are measures from a single fact table. There are many others that I still need to add, but to stop the report from being too wide I need to show the current month and year-to-date measures vertically.
- v-hashadapu1 year ago
Community Support
Hi Anon9876 , Thank you for reaching out to the Microsoft Community Forum.
Power BI still doesn’t support hiding table headers or locking column widths across visuals. The most reliable workaround is to turn off “Auto-size column width” on both visuals. Temporarily apply wide number formats (like 000000000.00) to stretch columns, align them manually, then revert the formatting.
To hide headers in the second table, set the header font colour to match the background, reduce the font size to 8pt and rename headers to a space (" ") or a zero-width character (U+200B). This makes them visually disappear, though not technically removed. Use the Align tools and Selection Pane to stack the visuals precisely. Enable “Maintain layer order” to prevent interaction issues.
If this helped solve the issue, please consider marking it “Accept as Solution” so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you. - alish_b1 year ago
Super User
Well with disconnected tables, you could compute a table in the following format at the refresh time (assuming you are using Import mode).
Duration Observed Actual Revenue Actual Costs Actual Margin Budget Revenue ....... Current Month 12345 2345 10000 99999 ....... Year To Date 123456 23456 100000 999999 ........ After this, it will be basic drag-and-drop. But yes, this can get messy when you have a lot of measures, and then again if there is some filtering requirement such as by Product, you will need to create above rows at that grain too. It would be great if Power BI just offered a fully customizable table at this point but sadly till then we will have to rely on these workarounds or push back on the requirements.