cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
atifmir Visitor
Visitor

Re: Check for null in conditional column

I just had the same issue and was scratching my head to why the null statement didn't work. After coming across this thread and putting null in the first statement, it worked a treat, thank you.

 

I was wondering, isn't this something they can't fix? Seems relatively straightforward.

ryan_mulhollem Regular Visitor
Regular Visitor

Re: Check for null in conditional column

Hi -

If you right click on the column that contains null values > Replace Values > Change null to a new text (for example I used "OS is Blank" > Then run the conditional column against your new text value... the query will work.

 

#"Replaced Value" = Table.ReplaceValue(#"Removed Columns4",null,"OS is Blank",Replacer.ReplaceValue,{"computer.operatingSystem"}),

 

- Ryan 

Highlighted
Anonymous
Not applicable

Re: Check for null in conditional column

This can be explained simply. The compiler cannot verify anything if there are null values, as null values return an error when an operation is performed on them. The null type is a distinct type, it is not a string or numbers. If you do not test for null values first, then it creates an error since you are asking the compiler to perform the operation on null values. Once the null values are out of the equation, the compiler can execute any other operations on the other fields. Always remember to think about the logical hierarchy when testing conditions. 

ErikBI Frequent Visitor
Frequent Visitor

Re: Check for null in conditional column

@KGrice 3 years later and it seems that what you said still holds true. Anyways thanks to past you for the help! 🙂 

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 391 members 3,442 guests
Please welcome our newest community members: