community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

formula to change multiple fields at once

Highlighted
Asteroid

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

 

 

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.

Asteroid

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

Labels