Forum Discussion
Anonymous
5 years agoNot applicable
[Expression.Error] We cannot convert the value null to type Logical.
Hi All... I've read through a few similar threads but didn't find a solution to my problem. Hoping someone can assist. I'm using the following code in Power Query to assign a fiscal year (FY...
- Anonymous5 years ago
null values can trip you up when used in if statements, and also with equality operators. I would try:
each if [startdate] = null then "" else if [enddate] = null then "" else if [active] = "1" and [live] = "1" and [latest] = "Green" and [startdate] > #date(2020,3,31) and [enddate] < #date(2021,4,1) then "FY21" else ""
--Nate
Anonymous
5 years agoNot applicable
Thanks, guys. What works best for my use case is to replace the null values with "".