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

formula to change multiple fields at once

aehrenwo
11 - Bolide

Hopefully, this is an easy solution. 

 

I have a scenario in my data where if a field is blank I need to swap around different fields (based on parsing results). 

sample1.jpg

 

So if App field is blank then the value in Country should be moved to Sector and the value in Sector should be moved to App. The Country value should be set to Null. 


Do I need to create a new temp field to support this? 

 

Adam

 

 

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

First I would use this formula for App:

IIF(isnull(App),Sector,App)

 

Then this formula for Sector:

IIF(App=Sector,Country,Sector)

Then this formula for Country:

IIF(Country=Sector,Null(),Country)

This is assuming that App cannot normally equal sector, and country cannot normally equal sector.

aehrenwo
11 - Bolide

Thanks -- right after I wrote this ... this is exactly where I landed. 

Labels