Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Replace a value with null/blank

Hello

 

I have a column that contains some values with the text "text". I want to replace these values with the default 'blank' value of PowerBI.

 

I clicked to replace and I left the 'replace with' value as empty, however these values appear in my slicer as void and not as (blank).

 

What should I need to replace them with so that they appear as (blank) for the default blank PowerBI value?

 

I post here what I see in the slicer and I highlight the value that I want them not to appear as void but as (blank):

 

Thanks!

  • Anonymous in power query when you are using replace, use null word not space in the replace with and that will do it.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

  • Hi Anonymous ,

     

    As parry2k  said, we use the ‘null’ keyword in the M code to refer to the null

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

4 Replies

  • Anonymous in power query when you are using replace, use null word not space in the replace with and that will do it.

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • SPT's avatar
      SPT
      New Member

      I have a similar issue but i want  to do it the other way round. I have null values and i want to replace these with "unallocated. 

      this is what i want.

      I've tried

      = Table.ReplaceValue(#"Changed Type","","unallocated",Replacer.ReplaceValue,{"Principal Truck"})

      and I've tried creating a new colum but this doesnt seem to work?

       

      Any ideas please? 

       

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi Anonymous ,

     

    As parry2k  said, we use the ‘null’ keyword in the M code to refer to the null

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.