Forum Discussion

zombieug's avatar
zombieug
Icon for Helper I rankHelper I
8 years ago
Solved

Check if Date is <= another Date in Table

Hello Forum,   I have the following table:   Based on Material Key and SD-SA Key there are Delivery Dates and Release Dates. What I want to create a measure or calculated column that check...
  • v-lili6-msft's avatar
    8 years ago

    Hi@ zombieug 

    After my research , you can use EARLIER Function to add a column as below:

    check = IF(CALCULATE(MAX(Table4[Release Date]),FILTER(Table4,Table4[Release Date]<=EARLIER(Table4[Delivery Date])))=Table4[Release Date],1,0)

    Result:

     

    Best Regards,

    Lin

  • zombieug's avatar
    zombieug
    8 years ago

    Hi v-lili6-msft Ashish_Mathur,

     

    had to chance it a little to:

    IF(CALCULATE(MAX(Sheet1[Release Date]);FILTER(ALLEXCEPT(Sheet1;Sheet1[SD-SA Key];Sheet1[Material Key]);Sheet1[Release Date]<=EARLIER(Sheet1[Delivery Date])))=Sheet1[Release Date];1;0)

     

    this way the column will work for sd-sa key and material key

    I think it should work know.

    Thanks to all of you who tried to help.