Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ovetteabejuela
Impactful Individual
Impactful Individual

Power Query | A little help on Comparing Nulls

So, I want to see if multiple columns are nulls and if they are filter them out.

 

My first attempt was something like

 

if [column1] = null and [column2] = null and [column3] = null and [column4] = null then "Yes" else "No" - doesn't work.

 

then I saw Value.Compare option and even just the List.Sum method - doesn't work!

 

Funny thing is that why is it that it doesn't shout at me in the designer(editor) but when I refresh the table it gives me this:

 comparingnulls.PNG

 

 So how do i correctly do this? Thanks in advance

5 REPLIES 5
v-danhe-msft
Employee
Employee

Hi @ovetteabejuela,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-danhe-msft
Employee
Employee

Hi @ovetteabejuela,

Could you have tried with the 'Add conditonal column' function in query editor?

1.PNG

Reference:https://excelkingdom.blogspot.com/2017/12/how-to-add-conditional-column-to-table.html

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Joorge_C
Resolver II
Resolver II

Can you try to change the column format to number,etc.. and get errors, then convert errors into something?

 

Or replace values on columns from null into something you can filter out.

@ovetteabejuela not sure why this will not work,

 

if [column1] = null and [column2] = null and [column3] = null and [column4] = null then "Yes" else "No"

 

in query editor it loads first 999 rows and when you refresh, it goes thru whole data set and I guess there is some issue when whole dataset get loaded.

 

Quick question, if you don't add this custom column, do you still get error? May be it is not this column but other error.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

"in query editor it loads first 999 rows and when you refresh, it goes thru whole data set and I guess there is some issue when whole dataset get loaded."

 

Yeah, i think this might be it, I will need to investigate further.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.