Forum Discussion

Alex_Bartlett's avatar
Alex_Bartlett
Frequent Visitor
4 years ago
Solved

Error will DateTime.LocalNow due to blanks

Morning all,   I am having an issue with trying to add a column to track current employees on a report.   To explain what I am trying to achieve, I want to return "true" or "false" for employees ...
  • Vijay_A_Verma's avatar
    4 years ago

    Replace DateTime.LocalNow with

    Date.From(DateTime.LocalNow())

    Also just this much is enough (You hadn't supplied column name in your Table.AddColumn. I have named it Result)

     

    = Table.AddColumn(#"Added Custom", "Result", each [ContractEndDate] = null or [ContractEndDate] > Date.From(DateTime.LocalNow()))