Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
How can I replace below column's numeric value to 0 in Power query
Also I cant see any advanced option to replace all values to 0
Thanks
NJ
Solved! Go to Solution.
Hi, @nj17
According to your describtion,You want to replace the non-null value of a column with 0. Right?
Here are my steps you can follow:
(1) This is my test data :
(2)You can click “Custom Column” in Power Query Editor and enter as follows:
if [Column1] <> null then 0 else null
(3)Then we just need to delete the original column,then we can meet your need :
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, @nj17
According to your describtion,You want to replace the non-null value of a column with 0. Right?
Here are my steps you can follow:
(1) This is my test data :
(2)You can click “Custom Column” in Power Query Editor and enter as follows:
if [Column1] <> null then 0 else null
(3)Then we just need to delete the original column,then we can meet your need :
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi,
Try this M code
=if Value.Type([Amount]) = type number then 0 else null
Hope this helps.
Hi @nj17,
If you don't want to do any further calculations using this column means you can convert data type from number to text and you can change it into 0.
Step 1:
Change the value to 0 for two to three value power bi automatically change the value to 0.
Thanks,
Hi @Shreeram04
I need to do further calculations on this so cant change datatype
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |