Power BI - M query 新建列处理null值逻辑时,报错:无法将值null转换为类型Logical。
正确写法:先处理null值逻辑。
= Table.AddColumn(重命名的列, "IsTOGreaterThan0", each if [TurnoverCurrentYear] = null then "Y" else if [TurnoverCurrentYear] >0 then "Y" else "N")
错误写法:
= Table.AddColumn(重命名的列, "IsTOGreaterThan0", each if [TurnoverCurrentYear] >0 then "Y" else if [TurnoverCurrentYear] is null then "Y" else "N")
Ref:Power Query里多条件判断时需要注意的null值处理问题_51CTO博客_power query null