We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula

SomuGS
8 - Asteroid

Hi,

 

I'm trying to formulate below formula from excel in Alteryx using the formula icon, but I keeping "Malformed IF statement".

 

=IF(AND(E16="",F16="",G16=""),"Yes",
IF(G16="",IF((MIN(E16:F16))<K16,"Yes",MIN(E16:F16)),
IF(MIN(E16:G16)<K16,"Yes",MIN(E16:G16))))

 

Is there a better way to formulate this logic in Alteryx?

 

 

bsomeshe_0-1674112724250.png

 

7 REPLIES 7
ShankerV
17 - Castor

Hi @SomuGS 

 

Can you help with the logic explained in few words, so can help to build a formula to work with Alteryx.

Also few data's to check in alteryx output.

 

 

 

binuacs
21 - Polaris

@SomuGS One way of writing the formula in Alteryx like below You need to change all the excel field name with corresponding Alteryx field name, also make sure that the datatype of the fields are correct

 

=IIF(isEmpty([E16]) And isEmpty([F16]) And isEmpty([G16]),"Yes",
IIF(isEmpty([G16])="",IIF((MIN([E16],[F16]))< [K16],"Yes",MIN([E16],[F16])),
IIF(MIN([E16],[G16])<[K16],"Yes",MIN([E16],[G16]))))
ShankerV
17 - Castor

Hi @SomuGS 

 

Seeing @binuacs reply will help you a lot.

 

++Information

When you read the excel files in alteryx, the cells which are empty in excel will be read as Null()

 

At that point replace the @binuacs formula with IsNull instead of IsEmpty.

 

Many thanks

Shanker V

SomuGS
8 - Asteroid

Hi  @ShankerV thanks for looking into this,

 

1. If all the three columns (DOL-FFS, DOL_DEL, DOL_TRNSFR) are blank then I need the result as Yes

2. If DOL_TRNSFR is blank then I need "Yes" if the MIN of DOL-FFS & DOL_DEL is lesser than DOJ-FINAL or return MIN of DOL-FFS & DOL_DEL

3. If any of the above is not true then I would need "Yes" if the MIN of DOL-FFS, DOL_DEL & DOL_DEL is lesser than DOJ-FINAL or return MIN of DOL-FFS DOL_DEL        & DOL_DEL

 

Sample Data 

 

Record#DOJDOJ_ADDDOJ_DELDOL-FFSDOL_DELDOL_TRNSFRPAY_DATESum_SALARY_80JJAADOJ-FinalDOL-Final
EVE#118/04/2016     31/03/2022      454,39318/04/2016Did not leave
EVE#202/09/2019     31/03/2022   6,386,84202/09/2019Did not leave
EVE#322/06/2020     31/03/2022      352,57322/06/2020Did not leave
EVE#423/07/2018     31/03/2022      592,37723/07/2018Did not leave
EVE#509/03/2020     31/03/2022      418,33809/03/2020Did not leave
EVE#620/03/2017     31/03/2022      611,62320/03/2017Did not leave
EVE#724/09/2018     31/03/2022      596,58624/09/2018Did not leave
EVE#808/10/2018     31/03/2022      430,82508/10/2018Did not leave
EVE#917/04/2017     31/03/2022      449,92417/04/2017Did not leave
EVE#1029/06/2020     31/03/2022      467,82729/06/2020Did not leave
EVE#1104/10/2017     31/03/2022      581,47504/10/2017Did not leave
EVE#1207/08/2019     31/03/2022      552,88907/08/2019Did not leave
EVE#1313/05/2019     31/03/2022      441,53613/05/2019Did not leave
EVE#1410/07/2017  12/12/2020            17,85310/07/201712/12/2020
EVE#1520/07/2020     31/03/2022   1,760,55320/07/2020Did not leave
EVE#1607/02/2018     31/03/2022      505,93007/02/2018Did not leave
EVE#1730/12/2019     31/03/2022      571,78930/12/2019Did not leave
EVE#1818/09/2019  17/08/2020              8,67218/09/201917/08/2020
EVE#1903/08/2020     31/03/2022      377,56203/08/2020Did not leave
EVE#2024/06/2019     31/03/2022      335,10324/06/2019Did not leave
EVE#2110/07/2017     31/03/2022   1,105,73310/07/2017Did not leave
EVE#2220/05/2019     31/03/2022      404,61420/05/2019Did not leave
EVE#2319/10/2020     31/03/2022      339,17519/10/2020Did not leave
EVE#2413/08/2019     31/03/2022      335,37513/08/2019Did not leave
EVE#2522/06/2020     31/03/2022      530,46222/06/2020Did not leave
EVE#2629/06/2020     31/03/2022      867,77829/06/2020Did not leave
EVE#2714/09/2020  10/03/2021            13,18814/09/202010/03/2021
EVE#2820/08/2018     31/03/2022      436,80420/08/2018Did not leave
EVE#2914/08/2017     31/03/2022      790,42114/08/2017Did not leave

 

 

 

SomuGS
8 - Asteroid

Thanks for the help.

binuacs
21 - Polaris

@ShankerV The isEmpty() function works on both Null values  and blank values.

ShankerV
17 - Castor

Hi @binuacs 

 

Thanks for the explanation. It was really helpful.

Tried, it worked too.

ShankerV_0-1674128381681.png

 

Labels
Top Solution Authors