Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Filter on rows which are between two strings, but are in different columns

Davonalt
7 - Meteor

Filter on rows which are between two strings, but are in different columns. I have combined several data steams and now i want to filter on the data between two fields. The fields are in bold.

 

Field 1Field 2Field 3Field 4Field 5Field 6Field 7Field 8Field 9
         
Excluded In Returns         
         
AONEMock1111COMPANY57 n
         
BTWOMock2222COMPANY68 y
         
Subtotal       for Excluded in Returns

  The output would then be..

         
AONEMock1111COMPANY57 n
         
BTWOMock2222COMPANY68 y
         
2 REPLIES 2
OllieClarke
15 - Aurora
15 - Aurora

Hi @Davonalt 

You can use the multi-row formula here to create a flag field which you can then filter on
image.png

 

we can check whether the row before contains excluded in returns (which is case insensitive) to turn the flag on, and check if the current field 9 contains it to turn the flag off.

If contains([row-1:Field 1],'excluded in returns') THEN 1
ELSEIF contains([field 9],'excluded in returns') THEN 0
ELSE [row-1:flag]
ENDIF

 Hope that helps,

 

Ollie

Davonalt
7 - Meteor

Thank you.

 

Labels
Top Solution Authors