Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In Attached data need logic help to write the nested if condition.
I need only the rows with below mention condition.
1) [Location Code]=209931 and [Entry Type]=0 and left([Gen_ Bus_ Posting Group],4)='VEND' and [Quantity]>0 as Purchase
[Location Code]=209931 and [Entry Type]=0 and left([Gen_ Bus_ Posting Group],4)='VEND' and [Quantity]<0 as PurchaseReturn
2) Location Code :- GC/SR/016 and [Entry Type]=4 and [ReceiptFROM]=209910,RECD-M,DTG-SYMP,SYMP,HARMONY-M,MFG-EMB,209920,209932,GC/WH/50,209915 and [Quantity]>0 as Purchase
Location Code :- GC/SR/016 and [Entry Type]=4 and [ReceiptFROM]=209910,RECD-M,DTG-SYMP,SYMP,HARMONY-M,MFG-EMB,209920,209932,GC/WH/50,209915 and [Quantity]<0 as PurchaseReturn
3) Location Code :- 209910 and [Entry Type]=0 and left([Gen_ Bus_ Posting Group],2)<>'IN' and [Quantity]>0 as Purchase
Location Code :- 209910 and [Entry Type]=0 and left([Gen_ Bus_ Posting Group],2)<>'IN' and [Quantity]<0 as PurchaseReturn
Location Code :- 209910 and [Entry Type]=0 and left([Gen_ Bus_ Posting Group],2)='IN' and [Quantity]>0 as INWARD
Location Code :- 209910 and [Entry Type]=0 and left([Gen_ Bus_ Posting Group],2)<'IN' and [Quantity]<0 as OUTWARD
Personally I would add these as columns in the load script rather than trying to do it in the front end..
but either way just do if() + if() + if()
so:
If([Location Code]=209931 and [Entry Type]=0 and left([Gen_ Bus_ Posting Group],4)='VEND' and [Quantity]>0, sum(yourfield),0)
+
if([Location Code]='GC/SR/016' and [Entry Type]=4 and [ReceiptFROM]=209910,RECD-M,DTG-SYMP,SYMP,HARMONY-M,MFG-EMB,209920,209932,GC/WH/50,209915 and [Quantity]>0, sum(yourfield),0)
+
if([Location Code]=209910 and [Entry Type]=0 and left([Gen_ Bus_ Posting Group],2)<>'IN' and [Quantity]>0, sum(yourfield),0) as Purchase
Hi Adam,
I want to create the field on backend.
yep so just write that as a preceeding load in your script