Free Trial

Alteryx Designer Desktop Discussions

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

Addition of data based on condition

Gsiva3
8 - Asteroid

Hi all,

 

I have a input column named Description. 

 

My concern is, whatever the length of Description might be but the output of the length of description should be 40. For example, in the input what I have attached, the length of "A4 cell" is 14 but my expected output is 40 characters. Hence the difference here is (40-14=26). So these 26 characters I need as  "*" in the separate column as mentioned in output sheet which is attached below. Is there any possibility for this.

 

Please help me with this. Herewith I have attached the input & output sheet.

5 REPLIES 5
Qiu
21 - Polaris
21 - Polaris

@Gsiva3 

Something like this?

1215-Gsiva3.PNG

grazitti_sapna
17 - Castor

Hi @Gsiva3 , give this a try.

 

grazitti_sapna_1-1608016836229.png

 

I hope this works, kindly mark this post as solution.

Thanks.

 

Sapna Gupta
atcodedog05
22 - Nova
22 - Nova

Hi @Gsiva3 

 

Adding a little bit of background explanation to @Qiu 's and @grazitti_sapna 's solution.

atcodedog05_0-1608018406052.png

atcodedog05_1-1608018473889.png

 

Since in your case padding needs to done on empty string. Both padLeft or padRight can be used.

 

Hope this helps 🙂

 

 

 

Qiu
21 - Polaris
21 - Polaris

You might become a good teacher.😁

Gsiva3
8 - Asteroid

Hi @Qiu 

 

Thank you so much. Got it!!!

Labels
Top Solution Authors