Alteryx Designer Desktop Discussions

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

If statement for rows??

kceesay
7 - Meteor

Hi everyone,

 

I am trying to build an IF statement to read each row for values containing "rp" and replace the row above with "Tree" using the multi row formula. I keep running into issues any idea how I can troubleshoot?

 

IF (Contains([F2], "rp")) = "TRUE"
THEN[Row-1:F2] = "Tree"
ELSE [F2]

5 REPLIES 5
Felipe_Ribeir0
16 - Nebula

Hi @kceesay 

 

Try this formula

 

IF Contains([Row+1:F2], "rp") then
"Tree"
ELSE [F2]
ENDIF

 

Felipe_Ribeir0_0-1676312250278.png

 

DataNath
17 - Castor

Hey @kceesay is this what you're looking for? Just need to work the other way around and look downwards if so:

 

DataNath_0-1676312279667.pngDataNath_1-1676312286073.png

ShankerV
17 - Castor

Hi @kceesay 

 

Please use the below IF statement.

 

IF (Contains([Row +1:F2], "rp"))

THEN "Tree"
ELSE [F2]

ENDIF

 

ShankerV_0-1676312517470.png

 

IF Condition is True 

THEN statement gets executed

ELSE ie. False statement gets executed.

ENDIF is necessary to end the condition.

 

Many thanks

Shanker V

kceesay
7 - Meteor

Yes this worked thank you!

kceesay
7 - Meteor

Yes, you're right I should've been looking down a row vs up one thank you!

Labels