Hello, I am looking to concatenate columns into one string but I also need to format it with multiple spaces in between
Example:
Column 1 Column 2 Column 3
2835 2900 0000A2
I need the string to look like below, having a fix amount of blank spaces in between:
2835 2900 0000A2
thx!
@mzlee How many fixed spaces do you need?
Hi @mzlee
Assuming you're outputting to a fixed width file you could try something like this with the padright function:
padright(tostring([Column 1]),14,' ') + padright(tostring([Column 2]),21,' ') + [Column 3]
This thread may also help you: https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Create-a-fixed-width-output-us...6
I need 6 fixed spaces between Column 1 and Column 2, and 10 fixed spaces between column 2 and Column 3
Hi Luke,
Yes, should be a fixed length as well of 30 characters. Sorry for not adding that information on my initial question!
This should work assuming columns 1 and 2 are always 4 characters. padright(tostring([Column 1]),10,' ') + padright(tostring([Column 2]),14,' ') + [Column 3]