Forum Discussion

mxfx's avatar
mxfx
Frequent Visitor
2 years ago
Solved

query M: Use today if endate is empty

I have a function to calculate elapsed business days between two dates: It works but if there is no EndDate, it returns an empty cell, I would like it to use "today" if there is no EndDate...
  • JoeBarry's avatar
    2 years ago

    Hi mxfx 

     

    In Power Query, highlight the End Date column and in an empty cell right click and relace value. Enter a fake date.

     

     

     

    In the formula ribbon replace the fake date

     

    with 

     

    Date.From(DateTime.LocalNow())

    Thanks

    Joe

     

     

    If this post helps, then please Accept it as the solution