Free Trial

Alteryx Designer Desktop Discussions

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

Remove string of a row that another row contains

hatudu95
6 - Meteoroid

Hi,

 

Just wondering if there is a quick way to do. 

 

Input

A1 E2
A1 E2 H3
A1 E2 H3 J4
A1 E2 H3 J4 M5
A1 E2 H3 K4
A1 E2 H3 K4 N5
A1 E2 H3 K4 O5
B1 C2
B1 F2 H3
B1 F2 H3 J4
B1 F2 H3 K4

 

Output

A1 E2 H3 J4 M5
A1 E2 H3 K4 N5
A1 E2 H3 K4 O5
B1 C2
B1 F2 H3 J4
B1 F2 H3 K4

 

I tried to use Multi tool as below but could not work.

if FINDSTRING([Row-1:Concat_Adjusted Value], [Concat_Adjusted Value])>0
THEN "Remove" ELSE "Keep" ENDIF

 

Thanks very much for your help.

6 REPLIES 6
Deano478
12 - Quasar

hey @hatudu95 you can do it this way

rzdodson
12 - Quasar

@hatudu95 it looks like the longest text string is 14 characters. In this solution, I created a simple Formula that returns nulls for all text strings less than 14 characters, and then used a Filter tool to remove nulls from your record set. Hope that helps! :)

 

01. Solution - 1.png02. Solution 2.png

hatudu95
6 - Meteoroid

@rzdodson @Deano478 I am looking for a more comprehensive solution. Not just taking the longest string. Just adjusted the question slightly. Could you please help

Rags1982
10 - Fireball

Hi @hatudu95 

Does this help?

FinnCharlton
13 - Pulsar

Hi @hatudu95 , to me it looks like you are trying to filter for 'childless' rows, where the value ends the previous sequence and has no continuation. If that's right, you can do it like this:

 

image.png

hatudu95
6 - Meteoroid

@FinnCharlton This was exactly what I was looking for. I tried contains but was keeping used "Row - 1" - thats why then

@Rags1982 Your one was great, very logical. It albsolutely worked.

 

Thank you very much both of you.

Labels
Top Solution Authors