Forum Discussion

SN1900's avatar
SN1900
Frequent Visitor
7 years ago
Solved

IF formular

Hello all,    I have an issue with an IF formular as I do not now how i can build the if formular in Power BI as I am quite new in Power BI.   I have two  different columns from two data fields w...
  • Mariusz's avatar
    Mariusz
    7 years ago

    Hi SN1900 

     

    Please see the below.

    Column = 
    VAR x = (
        CALCULATE(
            MAX( Event[Event Date NEW UTC] ), 
            Event[STATUS] = "DELIVERED" 
        ) - Delivery[Delivery Appointment DATE] 
    ) * 1
    RETURN 
    SWITCH(
        TRUE,
        x = 0, "On Time",
        x > 0, "Late",
        "Early"
    )
    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski