We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

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
8 - Asteroid

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
21 - Polaris
21 - Polaris

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

Qiu
21 - Polaris
21 - Polaris

@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
21 - Polaris
21 - Polaris

@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
8 - Asteroid

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

Qiu
21 - Polaris
21 - Polaris

@mrai02 
Yes, I also agree. 😁

mrai02
8 - Asteroid

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

Labels
Top Solution Authors