Forum Discussion
Nspiler
1 year agoFrequent Visitor
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...
- 1 year ago
Instead of using
if[FY18]= #date(null)
Use
if[FY18]= null
- 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 ...
Omid_Motamedise
Super User
1 year agoInstead of using
if[FY18]= #date(null)
Use
if[FY18]= null