In Power BI I have an M Query that tests for the value in a column equaling or not equaling to null
.
When I add the statement for [Sale.Revenue] <> null
I get an error however it works fine for the [UserRole.Name] = null
it works fine. Tested just by removing the statement and adding it back.
We cannot convert the value null to type Logical.
This seems like it should work but just can't figure it out.
add_user_role_group = Table.AddColumn(
join_expand_sale,
"UserRole.Group1",
each (
if [UserRole.Name] = null and
[Sale.Revenue] <> null then
"Group1"
else if Text.Contains([UserRole.Name], "Manager") then
"Group2"
else
"Undefined"
)
)
I am sure it is something glaringly obvious :/ Thanks for your thoughts on this.