Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Business Query

ShreyaSharma
8 - Asteroid

Hi ,

 

Anyone please take a look..

 

I need to input this formula..so that it should not overlap the next formula..how to do it ...

 

 

 

IF [A]!=0 AND [AT]= "0" THEN "ABD" ELSE "" ENDIF
 
if [STM]="DSW" THEN "BDC" Else"" ENdif
 
IF [ASW]=0 and [DFS]<5 THEN "DS"  ELSE "" ENDIF
 
IF [SSMD]<5 THEN ""FGHFHR"ELSE "" ENDIF

 

8 REPLIES 8
grazitti_sapna
17 - Castor

Hi @ShreyaSharma,

 

Can you please explain what do you exactly mean by "Overlapping"? Do you want these if else statements to be linked together using "AND" or "OR"? Can you provide some data sample and what do you expect your output to be?

 

Please try the below formula and let me know if this is what you are looking for

 

IF [A]!=0 AND [AT]= "0" THEN "ABD"

ELSEIF [STM]="DSW" THEN "BDC"

ELSEIF [ASW]=0 and [DFS]<5 THEN "DS"
ELSEIF [SSMD]<5 THEN ""FGHFHR"

ELSE "" ENDIF

Sapna Gupta
Emil_Kos
17 - Castor
17 - Castor

Hi @ShreyaSharma,


I believe I have created something similar to what @grazitti_sapna has proposed:

 

IF [A]!=0 AND [AT]= "0" THEN "ABD"
ELSEIF [STM]="DSW" THEN "BDC"
ELSEIF [ASW]=0 AND [DFS]<5 THEN "DS"
ELSEIF [SSMD] < 5 THEN "FGHFHR" ELSE "" ENDIF

 

Hope it helps. 

ShreyaSharma
8 - Asteroid

Hi @grazitti_sapna 

 

Input and Output Data Attached....

 

The Logic should not overlap ...

 

means...

 

1. IF [A]!=0 AND [AT]= "0" THEN "ABD"

2.IF [STM]="DSW" THEN "BDC"

3.F [ASW]=0 and [DFS]<5 THEN "DS"
4.IF [SSMD]<5 THEN ""FGHFHR"

 

grazitti_sapna
17 - Castor

Hi @ShreyaSharma,

 

I hope this solves your issue.

 

grazitti_sapna_0-1599475096596.png

 

Sapna Gupta
ShreyaSharma
8 - Asteroid

Hi @grazitti_sapna 

 

Can you tell me what wrong here why i am getting Null on second line..

ShreyaSharma_0-1599475522348.png

 

ShreyaSharma
8 - Asteroid

@grazitti_sapna  got it..I used ""

 

Thanks

ShreyaSharma
8 - Asteroid

.

 

 

grazitti_sapna
17 - Castor

Is this what you are trying to achieve? 

grazitti_sapna_0-1599482230221.png

If yes then I believe the formula you are using is correct just need to change the priorities as you can see the row 4 satisfy the criteria Manual !=0 and GT-Manual=0 that is why it takes the status as Open Item just switch line 1 and 2 and it will work as it will give first priority to Record MJE then although it satisfy the condition mentioned earlier.

Also you need to prioritise the if else condition if two rows satisfy same condition and you are applying another condition to the same row then priority should be given as per the logic or end result you are looking for.

I hope this solves your query.

If yes, then kindly mark this post as solution.

IF [Right_SO-Fset-Eset]= "Reserve for Parts--" THEN "Record MJE"
elseif [Manual]!=0 AND [GT-Manual]= 0 THEN "Open item"
Elseif [SL Solution]="Aged item-Reservs booked with no amortization for 180 days from ATD1" THEN "Open Item-Aged"
Elseif [SL Total]=0 and [Grand Total]<5 THEN "Open item_Closed order"
Elseif [Grand Total]=0 and [SL Total]=0 THEN "Open item_Closed order"
Elseif [GL vs SL]= 0 THEN "Record_Matched"
Elseif [GL vs SL] > 5 THEN "Open Item" ELSE "" ENDIF

 

Thanks.

Sapna Gupta
Labels