Forum Discussion

ntruong1994's avatar
ntruong1994
Frequent Visitor
2 years ago
Solved

Replace values in a column to BLANK/NULL

Hi all, Is it possible to replace all values in a column to BLANK/NULL using Power Query ? There are some sensitive information I want to remove but still need to keep the column header    R...
  • dufoq3's avatar
    2 years ago

    The easiest way is:

    1. Delete your column.
    2. Create new custom column (with same name as previously deleted column) and put value null.

     

    If you want to do this for multiple columns you can use this code as a new step

    Just replace Previous_Step_Name with your previsous step reference and replace "Column1", "Column2" in curly brackets with your column names (or add more).

    = Table.ReplaceValue(Previous_Step_Name, null, each null, (x,y,z)=> z, {"Column1", "Column2"})