Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to add multiple whitespace based on another column

mrai02
7 - Meteor

Hello everyone in Alteryx Community,

I wanted to add multiple whitespace based on another column so I can use text to column on the next step.

The given Input and the Required Output are given below.

The formula which I tried to use is given below.

I would really appreciate it if this could be done in a easy and simple to implement way.

Thanks in Advance for the help.

Input And Required OutputInput And Required OutputTried this but got errorTried this but got error

8 REPLIES 8
Qiu
20 - Arcturus
20 - Arcturus

@mrai02 
So you want to add the the number of "Lvl Number" while space in front of the string?

Qiu
20 - Arcturus
20 - Arcturus

@mrai02 
If YES, we can use the Generate Rows tool to generate the necessary number of Space, then put back to the original string.

1026-mrai02.PNG

Felipe_Ribeir0
16 - Nebula

Hi @mrai02 

 

Another option to do this, you can use the PADLEFT function

 

Felipe_Ribeir0_0-1666762064138.png

 

Qiu
20 - Arcturus
20 - Arcturus

@Felipe_Ribeir0 
I feel ashamed now. 😂

Felipe_Ribeir0
16 - Nebula

😂This function is not very common i guess, i had the lucky to get some practice with it some months ago!

mrai02
7 - Meteor

Thanks @Qiu For the solution, it solves the problem but is very long and adds extra steps to the process.

Qiu
20 - Arcturus
20 - Arcturus

@mrai02 
Yes, I also agree. 😁

mrai02
7 - Meteor

Hey @Felipe_Ribeir0 , Thanks for solution and showing us a new formula.

Labels