Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Parsing data

Nastya
8 - Asteroid

I need to get data after the last number in passed route including this number. For example:

The whole routePassed routeNext route
388-351-302-351-406-255388-351-302-351351-406-255
344-382-254-476344-382382-254-476
251-202-4975-202-656-202-3221251-202-4975-202-656-202202-3221

 

But the problem is that passed route doesn't always match the whole route. For example.:

388-351-302-456-351-406-255388-351-302-351351-406-255

 

So, it's needed to orientate on the number of times the last point was in the string 

 

Thanks a lot for any help!

 

7 REPLIES 7
BenMoss
ACE Emeritus
ACE Emeritus

To confirm at the start you have your first two columns and you want to get the 'next route' column?

Nastya
8 - Asteroid

Yes

BenMoss
ACE Emeritus
ACE Emeritus

Here is how I would approach the problem using some simple string functions.

 

There may be some scenarios that this does not resolve for, but if you could post examples of them then we can ammend accordingly :)

 

See attached.

 

Ben

Nastya
8 - Asteroid

In the second part of my message I told about this problem:

But the problem is that passed route doesn't always match the whole route. For example.:

388-351-302-456-351-406-255388-351-302-351351-406-255
BenMoss
ACE Emeritus
ACE Emeritus

Sorry that one was awfully close to the first one and I mistook them as identical which they are not.

 

My question is in this case. How many pieces can be missing?

For example...

 

388-351-302-456-351-406-255388-351-302-300-406What is this?

 

and

 

388-351-302-456-351-406-255388-232-302-342-351What is this?
Nastya
8 - Asteroid

Any number of pieces, there is not fixed one. That's the problem 

BenMoss
ACE Emeritus
ACE Emeritus

Okay.

 

Here is a new solver. Clearly a bit more complex but it works for your given scenario. 

 

Ben

Labels