Forum Discussion
Concat strings and indentation in Matrix
- 3 years ago
Hi BeaBF,
First of all, you must use a monospace font (Courier New, for example).
Secondly, you must switch off the "Word wrap" option in the "Row headers" setting of the Matrix visual (see this solution - https://community.fabric.microsoft.com/t5/Desktop/Keep-spaces-in-column-fields-when-using-table-matrix/m-p/432210).
Then everything works with a calculated column like this:
And the same in plain text:
LIV_5 = VAR MinIdent = 1 VAR MaxLen = MAXX ( ALL ( data ), LEN ([Description] )) VAR QtyExtraSpaces = MaxLen - LEN ( [Description] ) + MinIdent RETURN [Description] & REPT (UNICHAR(32), QtyExtraSpaces ) & CONVERT ( [Code], STRING )Best Regards,
Alexander
Hi BeaBF,
First of all, you must use a monospace font (Courier New, for example).
Secondly, you must switch off the "Word wrap" option in the "Row headers" setting of the Matrix visual (see this solution - https://community.fabric.microsoft.com/t5/Desktop/Keep-spaces-in-column-fields-when-using-table-matrix/m-p/432210).
Then everything works with a calculated column like this:
And the same in plain text:
LIV_5 =
VAR MinIdent = 1
VAR MaxLen = MAXX ( ALL ( data ), LEN ([Description] ))
VAR QtyExtraSpaces = MaxLen - LEN ( [Description] ) + MinIdent
RETURN [Description] & REPT (UNICHAR(32), QtyExtraSpaces ) & CONVERT ( [Code], STRING )
Best Regards,
Alexander
- BeaBF3 years ago
Super User
Hi barritown!
First of all, thank you very much for your help. It's just what I had already implemented, with a slightly different formula but returning the same output.I realized from your answer that the problem is the font, but I have a mandatory font to use.
Do you know if there is any resolution for this problem?