Forum Discussion
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:
So how do i correctly do this? Thanks in advance
5 Replies
- AnonymousNot applicable
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.
- parry2kSuper User
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.
- ovetteabejuelaImpactful Individual
"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.
- v-danhe-msftMicrosoft Employee
Hi ovetteabejuela,
Could you have tried with the 'Add conditonal column' function in query editor?
Reference:https://excelkingdom.blogspot.com/2017/12/how-to-add-conditional-column-to-table.html
Regards,
Daniel He
- v-danhe-msftMicrosoft 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