Forum Discussion

ovetteabejuela's avatar
ovetteabejuela
Impactful Individual
7 years ago

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

  • Anonymous's avatar
    Anonymous
    Not 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.

    • parry2k's avatar
      parry2k
      Super 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.

       

       

      • ovetteabejuela's avatar
        ovetteabejuela
        Impactful 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-msft's avatar
    v-danhe-msft
    Microsoft 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