The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a text field that I'm using for matrix columns.
I'd like to pad each value to a maximum length of 25.
I am not finding a function to do this.
Is there a way to right pad a text field?
Thanks
Solved! Go to Solution.
Hi @wfarm ,
Maybe a measure can be used to solve this.
I created a matrix with a simple.
Matrix at the beginning.
The longest number here is 999999999.So I created a measure to represent the width of the column I want. Put it into the matrix.
widths = 123456789
Then turn of the Auto-size width.
Replace widths with values.
Attach the pbix file for reference.
Hope it helps.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi @wfarm ,
Maybe a measure can be used to solve this.
I created a matrix with a simple.
Matrix at the beginning.
The longest number here is 999999999.So I created a measure to represent the width of the column I want. Put it into the matrix.
widths = 123456789
Then turn of the Auto-size width.
Replace widths with values.
Attach the pbix file for reference.
Hope it helps.
Best Regards,
Community Support Team_Gao
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Thanks Greg.
My situation is that I want to build a matrix with this field becoming the column. The number of values will change from monmth-to month. I can set the column width now and turn off "Auto-fit" on the column settings but then next month I may get a value in a record that is longer and then it stretched out and doesn;t automatically wrap. I was hoping that if I set a maximum length and then kept auto-wrap on, the new values, along woth the previously seen values, would all be the same width.
Am I missing something?
Is there another way to deal with this so that my column widths remain constant?
THanks!
@wfarm Perhaps a Custom Format String. Otherwise, you could do this:
Measure =
VAR __Text = MAX('Table'[Column])
VAR __Len = LEN(__Text)
VAR __Rept = 25 - __Len
RETURN
REPT(" ",__Rept) & __Text
Or perhaps I am not understanding.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
78 | |
77 | |
39 | |
36 |
User | Count |
---|---|
158 | |
111 | |
64 | |
59 | |
54 |