Forum Discussion
Dunner2020
Post Prodigy
5 years agoOLE DB or ODBC error:
Hi there, I am getting “OLE DB or ODBC error: [Expression.Error] We cannot convert the value null to type Logical” error. I am not sure where I am making mistake. Attached file contains the code. An...
Anonymous
5 years agoNot applicable
Hi Dunner2020 ,
According to the error message, It seems that your row contains null value somewhere in your data and null is neither True or False. Therefore, when trying to convert to Data Type Logical, it’s giving the error. You have to remove the null from the row(s).
It is very likely that this below part of the logic does not include operations on null/blank values.I'd suggest you check the Applied steps to find the exactly error step.
#"Added Custom4" = Table.AddColumn(#"Changed Type2", "Health Category", each let material = if (Text.Contains([CROSSARMMATERIAL],"W") or Text.Contains([CROSSARMMATERIAL],"M")) and [CROSSARMMATERIAL] <> "UNKNOWN" then true else false
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.