Free Trial

Alteryx Designer Desktop Discussions

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

Tranform Excel nested formula to Alteryx

Sarath27
8 - Asteroid

**Urgent**

Could you please check if I correctly transformed this excel formula in Alteryx?

 

=IF($B$1="Sun",IF(AH4<0,-BC4*VLOOKUP(BJ4,'FX Rates'!$A:$C,3,FALSE),BC4*VLOOKUP(BJ4,'FX Rates'!$A:$C,3,FALSE))*3,
IF($B$1="Sat",IF(AH4<0,-BC4*VLOOKUP(BJ4,'FX Rates'!$A:$C,3,FALSE),BC4*VLOOKUP(BJ4,'FX Rates'!$A:$C,3,FALSE))*2,
IF(AH4<0,-BC4*VLOOKUP(BJ4,'FX Rates'!$A:$C,3,FALSE),BC4*VLOOKUP(BJ4,'FX Rates'!$A:$C,3,FALSE))))

 

 

$B$1=Day
AH4 = Current Rate
BC4 = Cost Today Amt
Vlookup value = FX Rate

 

IF [Day]="Sun"

THEN
(IF [Current Rate]<0 THEN
-[Cost Today Amt.]*[FX Rate]*3
ELSE [Cost Today Amt.]*[FX Rate]*3
ENDIF)
ELSEIF

[Day]="Sat" THEN
(IF [Current Rate]<0 THEN -[Cost Today Amt.]*[FX Rate] ELSE [Cost Today Amt.]*[FX Rate] ENDIF)*2
ELSEIF

[Current Rate]<0 then
-[Cost Today Amt.]*[FX Rate]
ELSE
[Cost Today Amt.]*[FX Rate]
ENDIF

 

Note: My Reporting day is Sunday, as per the formula the amount should be multiplied by 3, but its actually not. And this formula perfectly works for any day other than Sun and Sat.

1 REPLY 1
caltang
17 - Castor
17 - Castor

That's one long IF statement my friend. Better to show us the data and what you intend to do with sample data, then apply it to your own workflow.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels
Top Solution Authors