community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Parsing data

Meteor

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!

 

Alteryx Certified Partner
Alteryx Certified Partner

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

Meteor

Yes

Alteryx Certified Partner
Alteryx Certified Partner

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

Meteor

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
Alteryx Certified Partner
Alteryx Certified Partner

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?
Meteor

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

Alteryx Certified Partner
Alteryx Certified Partner

Okay.

 

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

 

Ben

Labels