Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Fill in null value from condition below?

Arno_M
6 - Meteoroid

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
6 - Meteoroid

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
6 - Meteoroid

It worked! Thank you so much!!

Labels