Alteryx Designer Desktop Discussions

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

How we do a Swap in Alteryx.

rohit782192
11 - Bolide

In the above SQL i have done SWAP of Male and Female using the case statement.

 

Is it possible to do same in Alteryx.

 

update management
set MANAGEMENT_SEX =
(CASE WHEN MANAGEMENT_SEX = 'F' THEN 'M' ELSE 'F' END);

3 REPLIES 3
grazitti_sapna
17 - Castor

@rohit782192 , yes you can achieve it by using IF statement in formula tool. Here is one example.

 

 

grazitti_sapna_0-1662619505633.png

Please accept my solution if its useful to what you need.

Sapna Gupta
rohit782192
11 - Bolide

Can we also use case statement in alteryx

Emmanuel_G
13 - Pulsar

@rohit782192  Yes it is possible.

 

You can do this using the BOM:

if test1 then result1
elseif test2 then result2
elseif test3 then
result3
.
.
.
else result_by_default endif.

 

You can add as many elseif as you want.

 

Does that answer your question?

Labels