Forum Discussion

JajatiDev's avatar
JajatiDev
Helper II
4 years ago
Solved

Excel Formula to DAX

Hi, I have the following excel formula, that retains the following values;   Allocated Pending Allocation Partial Allocation In Production   IF(OR([status]="Production",[status]="FactShipped"...
  • JajatiDev's avatar
    4 years ago

    Hi,

    I was able to replicate the formula.

     

    Order Status =
    IF(OR('Orders'[status]="Production",'Orders'[status]="FactShipped"),"In Production",
    IF(AND('Orders'[delivery_type]="Ship as available",'Orders'[order_qty]='Orders'[confirmed_qty]),"Allocated",
    IF('Orders'[delivery_type]="Ship as available" && 'Orders'[confirmed_qty]>0,"Partial Allocation",
    IF('Orders'[delivery_type]="Full order consolidation" && SUMX(FILTER('Orders','Orders'[order_no]=EARLIER('Orders'[order_no])),'Orders'[order_qty])=SUMX(FILTER('Orders','Orders'[order_no]=EARLIER('Orders'[order_no])),'Orders'[confirmed_qty]),"Allocated",
    IF('Orders'[delivery_type]="Full order consolidation" && SUMX(FILTER('Orders','Orders'[order_no]=EARLIER('Orders '[order_no])),'Orders'[confirmed_qty])>0 ,"Partial Allocation",
    "Pending Allocation")))))
     
    Now the next step for me is to code this in M Language.
     
    Thanks,
    Dev