Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculated column for date comparison

Hello, I have the folllowing table and i am trying to add a calculated column with output based on: 1. If Start date <= End date, output: Valid dates 2. If Start date > End date, output: Invalid d...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    Please check the below picture and the attached pbix file.

     

     

     

    Status CC =
    SWITCH (
        TRUE (),
        ISBLANK ( Data[Start date] ) || ISBLANK ( Data[End date] ), "Missing dates",
        Data[Start date] > Data[End date], "Invalid dates",
        Data[Start date] <= Data[End date], "Valid dates"
    )