Forum Discussion

RahulPBI's avatar
RahulPBI
Icon for Helper I rankHelper I
6 years ago
Solved

Calculating If Delivery is Early, On Time or Late based on two dates

Hello I am new to power BI and looking for some help with Power Query M language   I have a formula that works great in Excel and am looking for some help in recreating it in power query =IF([@[L...
  • artemus's avatar
    6 years ago

    In Add column this would be:

    = if [Lead Time] = "" or [Lead Time] = [Actual Ship Date] then 
       "On Time"
    else if [Lead Time] >= [Actual Ship Date] then
       "Early"
    else
       "Late"