We are currently experiencing an issue with Email verification at this time and working towards a solution. Should you encounter this issue, please click on the "Send Verification Button" a second time and the request should go through. If the issue still persists for you, please email support@alteryx.com for assistance.

Alteryx Designer Discussions

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

Fill in null value from condition below?

Arno_M
5 - Atom

Hello,

I’m trying to fill in a null cell above based on the condition that’s underneath. I can't seem to get the + and - formula correct based on the condition. 

 

Edit: my mistake here is the file example attached. If the value below is pizza, then the null cell above needs to turn into 4. When it gets to a blank cell it needs to look at the cell below, candy, and change the null value to 6. The file named subteam test final is the result needed.

 

This was the formula I was trying: 

 

IF IsEmpty([Row+1:Subteam]=="Pizza") THEN [Row-1:Subteam]=="4"

ELSEIF IsEmpty([Row+1:Subteam]=="Candy")

THEN [Row-1:Subteam]=="6"

ELSE (subteam) ENDIF

 

Example.JPG

5 REPLIES 5
mst3k
11 - Bolide

your spreadsheet isn't embedded so we can't run the workflow, an alternative would also be to just put a few rows of data into a text input tool.

so i can't run it, but it sounds like what you're trying to do is if it's empty, fill in using the value from the next row, in which case i think if you just change your formula to this it will work? you'l have to make sure your data is sorted in some way first, or you won't be able to always know what's in the next row. you could also run into problems if the row beneath that one is empty for some reason too

 

IF IsEmpty([Subteam]) THEN [Row+1:Subteam] ELSE (subteam) ENDIF

 

ncrlelia
11 - Bolide

Hi @Arno_M,

 

I would suggest:

 

IF IsEmpty([Subteam]) 

THEN IF  [Row+1:Subteam] = 'Pizza'

           THEN '4'

           ELSEIF [Row+1:Subteam] = 'Candy'

           THEN '6'

           ENDIF

ELSE [Subteam]

ENDIF

 

Hope this helps.

 

Cheers,

Lelia

Arno_M
5 - Atom

Hi Lelia,

 

This gives me a malformed if statement error. Thanks for looking!

ncrlelia
11 - Bolide

Hi @Arno_M,

 

I missed out the highlighted 'ELSE'.

ncrlelia_0-1631493275409.png

 

Cheers,

Lelia

Arno_M
5 - Atom

It worked! Thank you so much!!

Labels