Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have some column headers as such.
If I add on some extra text to the column header field it just makes the columns go longer to accomodate the new text
But what I want is for the column to go wider, not longer. So the text wraps around and goes over 2 lines consinstently across each column.
The only way it looks like I can curently do this is to manually move each column header into place, with the 'wrap text' option enabled. But this is not feasible as I have maybe 200 column headers, which grows by 1 dynamically each week.
Solved! Go to Solution.
Hey @andyor ,
as you said by default you have to do that manually.
However there are a few hacks. I think the best approach is the following:
The ultimate hack to set column widths in a matrix | Esbrina (esbrina-ba.com)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Hey @andyor ,
as you said by default you have to do that manually.
However there are a few hacks. I think the best approach is the following:
The ultimate hack to set column widths in a matrix | Esbrina (esbrina-ba.com)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Hi @selimovd this link seems great in theory but it doesn't explain how to do the steps it shows.
I tried adding the below as a new column but there isn't a column width table or column in my dataset, so that can't work. The solution also talks about calculation group column, alternate values etc .
When I download the pbix file there are 2 extra tables - Column Width and Spacing. They both have an 'Ordinal' attached and there's no mention of this in the solution. The other table is 'Sales', and there are no new columns or measures here either.
Where are we entering code like the below?
5 (format string expression) =
VAR currentValue =
SELECTEDMEASURE ()
VAR currentLength =
LEN ( CONVERT ( currentValue, STRING ) )
VAR selectedLength =
CONVERT (
SELECTEDVALUE ( 'Column Width'[Column Width], currentLength ),
INTEGER
)
VAR extraSpaces =
IF ( selectedLength > currentLength, selectedLength - currentLength, 0 )
VAR prefix =
REPT ( UNICHAR ( 0160 ), extraSpaces )
RETURN
"""" & prefix & """"
& SELECTEDMEASUREFORMATSTRING ()
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
120 | |
101 | |
71 | |
61 |