Alteryx Designer Desktop Discussions

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

Txt file Trailing Whitespace. Alignment affected

Inactive User
Not applicable

Hi All, can someone help me to delimit the data below. 

For the amounts it should have 3 columns

debit, credit, balance

 

I tried to used the replace the whitespaces using regex and replace it with pipe(|). However, the other whitespaces are delimited and this should have bakances of 0. I attached the sample input.

 

The picture is the desired output.

7 REPLIES 7
Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @Inactive User ,

I guess you need the first 3 rows, as the 4th row is different from the rest.

If that is the case, you can use Input Data tool specifying the file as Flat Ascii.

Yoshiro_Fujimori_1-1681099371604.png

 

Then you can set the column width as below.

Yoshiro_Fujimori_0-1681099264758.png

Result

Yoshiro_Fujimori_2-1681099437373.png

 

I hope this works for your case.

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Sorry I found an error in Input Data Tool for the Balance column.

I corrected it and added some data cleansing.

 

Workflow

Yoshiro_Fujimori_0-1681100149910.png

Output

Yoshiro_Fujimori_1-1681100199804.png

 

It should be better than the old one.

Inactive User
Not applicable

Thanks for the idea. However, this still does not work , there are instances wherein the amounts are not aligned properly thus being cutoff in another column.

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

@Inactive User ,

Is it possible to define more clearly which number should come into which column?

Row 1,2,4 have two numbers, while Row 3 has one number.

Also it is not clear which the two numbers in Row 4 belong to.

It is hard to guess from your description and data.

Inactive User
Not applicable

The output will somehow look like this

Watermark
12 - Quasar
12 - Quasar

Anon, part of the problem is your sample data is too small, and not being familiar with it, we can't tell what that third row is with only a "0" is supposed to represent, debit? credit? balance?

Should the 3 columns all be the same width?  If there are no values in that width then it's empty? 

I can't help you without knowing how to treat various conditions. 

 

Here is what I have, which to an extent isolates the entries to deal with, and separating off the data you want to parse, but need more information to help any further. 

Inactive User
Not applicable

Hi thank you for your reply. I can't seem to run the workflow. Here is a sample desired output

Labels
Top Solution Authors