Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Multi Condition IF Statement

chockalingam
5 - Atom

Hi Community - my statement below is not evaluating as expected.  Even when I have cities or expenses that do not match the condition they are still multiplied by the factor rather than returning to 0. 

 

Any suggestions would be helpful:

 

IF [City] = "Evanston" && [Expense Category] = "Shipping" &&

[CALMONTH] IN ('202301', '202401') THEN [Actuals]*.23 ELSEIF

[CALMONTH] IN ('202302', '202402') THEN [Actuals]*.24 ELSEIF

[CALMONTH] IN ('202303', '202403') THEN [Actuals]*.14 ELSEIF

[CALMONTH] IN ('202304', '202404') THEN [Actuals]*.26 ELSEIF

[CALMONTH] IN ('202305', '202405') THEN [Actuals]*.25 ELSEIF

[CALMONTH] IN ('202306', '202406') THEN [Actuals]*.27 ELSEIF

[CALMONTH] IN ('202307', '202407') THEN [Actuals]*.26 ELSEIF

[CALMONTH] IN ('202308', '202408') THEN [Actuals]*.26 ELSEIF

[CALMONTH] IN ('202309', '202409') THEN [Actuals]*.25 ELSEIF

[CALMONTH] IN ('202310', '202410') THEN [Actuals]*.25 ELSEIF

[CALMONTH] IN ('202311', '202411') THEN [Actuals]*.25 ELSEIF

[CALMONTH] IN ('202312', '202412') THEN [Actuals]*.26

ELSE 0

ENDIF

3 REPLIES 3
binuacs
21 - Polaris

@chockalingam updated formula attached

binuacs_0-1752874714485.png

 

chockalingam
5 - Atom

Many thanks @binaucs - the formula update now works as I expected.

Qiu
21 - Polaris
21 - Polaris

@chockalingam 
We can also use a Filter first for [City] and [Expense Category] then apply your formula.

0720-chockalingam.jpg

Labels
Top Solution Authors