Alteryx Designer Desktop Discussions

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

Delimite based on the # of numbers

Goran
8 - Asteroid

Hi everyone,

 

Is there a way to split out results in one column based on the # of numbers in the cell?  So if a cell contains 5 or more numbers then it should go into a separate column.  For example:

 

Current:

Column1

2.1.1.1. Stuff

2.1.1.1.1 Stuff

 

Desired:

Column1              Column2

2.1.1.1. Stuff        2.1.1.1.1 Stuff

 

Any ideas?

 

Thanks!!

5 REPLIES 5
jvansistine
9 - Comet

Hi @Goran ,

Maybe something like this would work?

jvansisine_0-1610555427406.png

-Jim

 

Goran
8 - Asteroid

Thanks very much!

 

Found the problem.  So I got your formula to work however what it seemed to do was replace all 6 numbers with a 1

 

I tried using your formula however I keep getting the following error:  The field "" is not contained in the record.

 

I seem to get that on just about every formula I tried and I"m not certain what that means?

jvansistine
9 - Comet

Can you share your formula?

 

All that formula should do is count how many digits exist in the string (Column 1), and create a new column with a value of 1 or 2 based on if there are 5 or more digits. It should not replace any numbers in your string on its own.

 

Or maybe an example of your workflow if you can share it?

Goran
8 - Asteroid

Hi,

 

So what I've been trying to do for a couple of days is to delimite a single column into 3 depending on the number of leading spaces.  Delmiting based on spaces didn't work as it kept giving me the same no "" in the column issue, so I was trying counting the number of #'s.  Attached is a sample of what I'm working on.  No leading spaces should stay where it is, 6 leading spaces should move to a new columns, and 12 leading spaces should go to a 3rd column.

 

I've attached a sample file with input and desired output.  Any help would be greatly appreciated.

jvansistine
9 - Comet

Interesting. Does this file come to you in Excel format? It almost looks like it might have been something like XML or JSON at one point the way it's structured. If you could get it in one of those formats, I think you'd be able to use the native parsing tools Alteryx has for those formats to get what you're after.

 

Absent that, the attached workflow is a bit of a "brute force" approach to the problem with formulas and multi-row formulas, but it does get to something like the output you want. Hopefully this can help get you going.

Labels