Forum Discussion
ntruong1994
2 years agoFrequent Visitor
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
Really appreciate your help
Regards,
NT
The easiest way is:
- Delete your column.
- 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"})
1 Reply
- dufoq3
Community Champion
The easiest way is:
- Delete your column.
- 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"})