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

Alteryx Designer Desktop Discussions

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

MultiRow IF Statement to return the value X rows prior (it varies)

alphabex18
8 - Asteroid

Hi All, 

 

I would like to change the current value of the column Leading Qualifier, but i dont know how to write a proper if statement within a multi-row formula tool.

Here is the logic.. IF(SegmentID="N301", then Return the value in the LeadQualifier column that corresponds with the most recent occurrence of NM101. Sometimes the NM101 is 13 rows prior, and sometimes it is only 2 rows priorm but it alwys has to look back, and not forward. I'm at a loss on how to write that in Alteryx.

Much appreciated!

 

 

 

Right_Loop HeaderSegmentIDLeadingQualifier
2100A Member NameNM101IL
2100A Member NameNM102IL
2100A Member NameNM103IL
2100A Member NameNM104IL
2100A Member NameNM105IL
2100A Member NameNM106IL
2100A Member NameNM107IL
2100A Member NameNM108IL
2100A Member NameNM109IL
2100A Member NamePER01IP
2100A Member NamePER02IP
2100A Member NamePER03IP
2100A Member NamePER04IP
 N301 123 ABC Drive
2 REPLIES 2
jasperlch
12 - Quasar

Hi @alphabex18

 

I would suggest using a Multi Row Formula to find LeadingQualifier of the most recently NM101 and then remove all the values for this new column except for N301:

 

Capture1.PNG

 

 

alphabex18
8 - Asteroid

 

 

 

Labels