Forum Discussion

Nspiler's avatar
Nspiler
Frequent Visitor
1 year ago
Solved

Expression error

I am using the following to establish a new conditional column in Power Query: = Table.AddColumn(#"Filtered Rows3", "LC19", each if[FY18]= #date(2017, 7, 1) and [FY19] = #date(2018, 7, 1) then "Ret...
  • Omid_Motamedise's avatar
    1 year ago

    Instead of using 

    if[FY18]= #date(null)

    Use

    if[FY18]= null

  • ronrsnfld's avatar
    1 year ago

    To explain further, your error message is because:

    #date(year, month, day) requires three arguments.

    #date(null) has only one argument

     

    Of course, #date(null,null,null) would also be invalid as the arguments for #date(...) need to be of type number and each within a certain range of numbers, and null cannot be converted to a number. 

     

    As others have pointed out, you can just use if [FY18]=null ...