Forum Discussion
[Expression.Error] We cannot convert the value null to type Logical.
- 4 years ago
This part needs to be made conditional
if Row[Charge To Home BU]
This needs a conditional operator say
if Row[Charge To Home BU] <> null
- 4 years ago
There's a nifty null coalesce operator ?? now. This allows for handling null checks compactly.
if Row[Charge To Home BU] ?? false then ...This is a shortcut for
if (if Row[Charge To Home BU] = null then false else Row[Charge To Home BU]) then ...The operator is documented here (scroll all the way down to the end):
https://docs.microsoft.com/en-us/powerquery-m/m-spec-operators
This part needs to be made conditional
if Row[Charge To Home BU]
This needs a conditional operator say
if Row[Charge To Home BU] <> null
- AlexisOlson4 years agoSuper User
There's a nifty null coalesce operator ?? now. This allows for handling null checks compactly.
if Row[Charge To Home BU] ?? false then ...This is a shortcut for
if (if Row[Charge To Home BU] = null then false else Row[Charge To Home BU]) then ...The operator is documented here (scroll all the way down to the end):
https://docs.microsoft.com/en-us/powerquery-m/m-spec-operators