The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Convert Excel formula to Alteryx

mylar
メテオロイド

Hi there,

 

Im trying to use the same formula I used on excel, on an alteryx workflow, but the language is somewhat different.

How can I translate this formula, to alteryx language?

 

=IF(AR137>0,IF(J137-K137<7,"Overdue",IF(J137-K137<10,"To Expire",IF(H137>J137,"Irrational",""))),"")

 

AR Column = Open qty

J Column = Cancel Date

K Column = Today Date

H Column = Confirm Date

 

Thanks in advance!

4件の返信4
cmcclellan
マグネター

Try .. 

 

IIF([Open qty]>0,IIF(DateTimeDiff([Cancel Date],[Today Date],"day")<7,"Overdue",IIF(DateTimeDiff([Cancel Date],[Today Date],"day")<10,"To Expire",IIF(DateTimeDiff([Confirm date],[Cancel Date],"day")>0,"Irrational",""))),"")

 

I'm guessing a few things here, so it might not be right the first go.  Can you supply some sample data if it doesn't work ?

ncrlelia
ボリード

Hi @mylar,

 

I believe cmcclellan's suggestion will work. Just sharing a different (my preferred) way of writing: 

 

IF [Open qty] > 0
THEN IF DateTimeDiff([Cancel Date],[Today Date], 'day') < 7
           THEN 'Overdue'
           ELSEIF DateTimeDiff([Cancel Date],[Today Date], 'day') < 10
           THEN 'To Expire'
           ELSEIF [Confirm Date] > [Cancel Date]
           THEN 'Irrational'
           ELSE ''
           ENDIF
ELSE ''
ENDIF

 

Hope this helps.

 

Cheers, 

Lelia

mylar
メテオロイド

Thank you both! It is very helpful and works perfectly 🙂

ancook
メテオロイド

Hi there same question, 

 

Im trying to use the same formula I used on excel, on an alteryx workflow, but the language is somewhat different.

How can I translate this formula, to alteryx language?

 

=IF(I2=1,"G",IF(AND(H2>I2,H2>K2,H2>L2),"Y",IF(OR(K2=1,L2=1,L2>H2,K2>H2,AND(H2>I2,K2>H2),AND(H2>I2,L2>H2)),"R","check")))

 

 

H Column = % Scan Thru

I Column = In Stock Rate

K Column = OOS Rate

L Column = Unavailable Rate

ラベル
トップのソリューション投稿者