Forum Discussion

MMZTM's avatar
MMZTM
Frequent Visitor
3 years ago
Solved

Backwards Scheduling DAX

Hey guys, I am looking for a new calculated Column by DAX that will create a backward scheduling for me using the two tables shown below. Based on the delivery date of the order table, the completi...
  • tamerj1's avatar
    tamerj1
    3 years ago

    MMZTM 
    Apologies for thr late reply. I was too busy today.

    Completion Date = 
    VAR CurrentOrderTable = 
        CALCULATETABLE ( Table1, ALLEXCEPT ( Table1, Table1[Order.No] ) )
    VAR TableAfter =
        FILTER ( CurrentOrderTable, Table1[Job-No.] > EARLIER ( Table1[Job-No.] ) )
    VAR NumberOfDays = 
        SUMX ( TableAfter, Table1[Time] )
    VAR Delivery = RELATED ( Table2[Delivery] )
    RETURN
        Delivery - NumberOfDays