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

change 2 fields with same condition at the same time

Hello, I am new in Alteryx World buy right now I am struggling to find a way to change 2 fields values with the same condition, I would say at the same time, I have seen some instruction like this to happen, only one sentence and changes 2 fields at same time, this is a SQL Type sentence:

 

UPDATE [TABLE] SET [FIELD1]='VALUE1 , [FIELD2]='VALUE2' WHERE SBG=[COND1] AND SBU=[COND2];

 

Hopefully someone with SQL knowledge could check the result of sentence above and find a similar tool in Alteryx to replicate the same. Thanks in advance.

Meteoroid

Try a Multi-Field Formula

 

with an expression like

if (SBG=[COND1] && SBU=[COND2]) then

      if

           ( [_CurrentFieldName_] = "Field1") then "Value1" elseif
           ( [_CurrentFieldName_] = "Field2") then "Value2" else [_CurrentField_] 

      endif

else

"[_CurrentField_ "

Endif

Labels