Hi,
Requesting assistance to convert the following Excel formulas in Power Query;
Requesting assistance to convert the following Excel formulas in Power Query;
Excel Formula:
=
IF(AND([@CompleteDelivery]="N",[@OrderQty]=[@ConfirmedQty]),"Allocated",
IF(AND([@CompleteDelivery]="N",[@ConfirmedQty]>0,[@ConfirmedQty]<[@OrderQty]),"Partially Allocated",
IF(AND([@CompleteDelivery]="Y",SUMIF([SalesOrderNo],[@SalesOrderNo],[OrderQty])=SUMIF([SalesOrderNo],[@SalesOrderNo],[ConfirmedQty])),"Allocated",
IF(AND([@CompleteDelivery]="Y",SUMIF([SalesOrderNo],[@SalesOrderNo],[ConfirmedQty])>0,SUMIF([SalesOrderNo],[@SalesOrderNo],[ConfirmedQty])<SUMIF([SalesOrderNo],[@SalesOrderNo],[OrderQty])),
"Partially Allocated",
"Pending Allocation"))))
Excel Formula:
=IF([@CompleteDelivery]="N",IF([@UnconfirmedQty]>0,[@ProductNo],""),TEXTJOIN(" / ",,UNIQUE(FILTER([ProductNo],([SalesOrderNo]=[@SalesOrderNo])*([UnconfirmedQty]>0),""))))
Excel Formula:
=IF([@SKUMix]="","",LEN(TRIM([@SKUMix]))-LEN(SUBSTITUTE([@SKUMix],"/",""))+1)
ReceiveDate | CustomerReqDate | SalesOrderNo | ProductNo | OrderQty | ConfirmedQty | UnconfirmedQty | CompleteDelivery | Order Status | SKUMix | NoOfImpactedSKUs | ||||||
6/22/2023 | 9/15/2023 | 112935380 | 1NR73A-K1H | 1 | 0 | 1 | N | Pending Allocation | 1NR73A-K1H | 1 | ||||||
7/3/2023 | 7/7/2023 | 113430548 | A1A30A-KGJ | 1 | 0 | 1 | N | Pending Allocation | A1A30A-KGJ | 1 | ||||||
7/4/2023 | 7/8/2023 | 113493710 | 1NR73A-K1H | 1 | 1 | 0 | N | Allocated | ||||||||
7/5/2023 | 7/9/2023 | 113512547 | A1A30A-KGJ | 1 | 0 | 1 | N | Pending Allocation | A1A30A-KGJ | 1 | ||||||
7/6/2023 | 7/10/2023 | 113543813 | 5RA32F-KGJ | 1 | 0 | 1 | N | Pending Allocation | 5RA32F-KGJ | 1 | ||||||
7/7/2023 | 7/11/2023 | 113561139 | A1A30A-KGJ | 1 | 0 | 1 | N | Pending Allocation | A1A30A-KGJ | 1 | ||||||
7/8/2023 | 7/12/2023 | 113705782 | A1A77A-KGJ | 10 | 5 | 5 | N | Partially Allocated | A1A77A-KGJ | 1 | ||||||
7/9/2023 | 7/13/2023 | 113725103 | N7L37A | 1 | 1 | 0 | N | Allocated | ||||||||
7/10/2023 | 7/14/2023 | 113900946 | 2Z600F-KGJ | 1 | 0 | 1 | N | Pending Allocation | 2Z600F-KGJ | 1 | ||||||
7/11/2023 | 7/15/2023 | 113933893 | 3JA05AN-150 | 1 | 0 | 1 | N | Pending Allocation | 3JA05AN-150 | 1 | ||||||
7/12/2023 | 7/16/2023 | 113969730 | A1A56A-KGJ | 1 | 0 | 1 | N | Pending Allocation | A1A56A-KGJ | 1 | ||||||
7/13/2023 | 7/17/2023 | 113987750 | 5RA32F-KGJ | 1 | 1 | 0 | N | Allocated | ||||||||
7/14/2023 | 7/18/2023 | 114002150 | 2Z613F-KGJ | 2 | 1 | 1 | N | Partially Allocated | 2Z613F-KGJ | 1 | ||||||
7/15/2023 | 7/19/2023 | 114002150 | 5RA32F-KGJ | 1 | 1 | 0 | N | Allocated | ||||||||
7/16/2023 | 7/20/2023 | 114003452 | 2Z600F-KGJ | 5 | 2 | 3 | N | Partially Allocated | 2Z600F-KGJ | 1 | ||||||
7/17/2023 | 7/21/2023 | 114005180 | 2Z600F-KGJ | 1 | 1 | 0 | N | Allocated | ||||||||
7/18/2023 | 7/22/2023 | 114016353 | A1A77A-KGJ | 1 | 0 | 1 | N | Pending Allocation | A1A77A-KGJ | 1 | ||||||
7/19/2023 | 7/23/2023 | 110113433 | 3GZ25A-KGJ | 1 | 0 | 1 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/20/2023 | 7/24/2023 | 110113433 | K5L35A | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/21/2023 | 7/25/2023 | 110113433 | 3GZ25A-KGJ | 1 | 0 | 1 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/22/2023 | 7/26/2023 | 110113433 | K5L35A | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/23/2023 | 7/27/2023 | 110113433 | Y3D03A | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/24/2023 | 7/28/2023 | 110113433 | Z7C07A | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/25/2023 | 7/29/2023 | 110113433 | 3PZ35A-KGJ | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/26/2023 | 7/30/2023 | 110113433 | D7P27A | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/27/2023 | 7/31/2023 | 110113433 | 3PZ35A-KGJ | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/28/2023 | 8/1/2023 | 110113433 | D7P27A | 1 | 0 | 1 | Y | Partially Allocated | 3GZ25A-KGJ / D7P27A | 2 | ||||||
7/29/2023 | 8/2/2023 | 110433907 | 3GZ25A-KGJ | 1 | 0 | 1 | Y | Partially Allocated | 3GZ25A-KGJ | 1 | ||||||
7/30/2023 | 8/3/2023 | 110433907 | K5L35A | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ | 1 | ||||||
7/31/2023 | 8/4/2023 | 110433907 | Y3D03A | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ | 1 | ||||||
8/1/2023 | 8/5/2023 | 110433907 | Z7C07A | 1 | 1 | 0 | Y | Partially Allocated | 3GZ25A-KGJ | 1 | ||||||
8/2/2023 | 8/6/2023 | 110433907 | 3GZ25A-KGJ | 1 | 0 | 1 | Y | Partially Allocated | 3GZ25A-KGJ | 1 | ||||||