Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Hashiru
Helper I
Helper I

Replace Errors

Hi all,

if I want to set the error values in a numeric column to zero using the query editor, does the following line of code will solve the problem?

 

#"Replaced Errors" =Table.ReplaceErrorValues(#"Changed Type",{{"CustomerID",0}})

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Hashiru ,

 

You code should be ok.

 

Capture.PNG

M code for your reference.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ddFLCoNAEIThu/TahVXj8wa5w+BCUExA3CXnT0jS0kLN9qc2H5Wz3dZ5eRwbrLLXvD9X2FRlu/8qvfJb/9vkNcXaeG1ibb22sXZeu1h7r32sg9ch1tHrGCvqk1Ff+pk1D9oHDYQWQhOhjdBIaCUKTGomCy9qJjWTmknNpGZSM6mZLDDThzm9AQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [RH = _t, Values = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"RH", type text}, {"Values", type text}}),
    gourp= Table.Group(#"Changed Type", {"Values"}, {{"RH", each """" & Text.Combine(List.Transform(_[NumberColumn], (x) => Number.ToText(x)), ",") & """", type text}}),
    #"Replaced Errors" = Table.ReplaceErrorValues(gourp, {{"RH", "0"}})
in
    #"Replaced Errors"
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @Hashiru ,

 

You code should be ok.

 

Capture.PNG

M code for your reference.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ddFLCoNAEIThu/TahVXj8wa5w+BCUExA3CXnT0jS0kLN9qc2H5Wz3dZ5eRwbrLLXvD9X2FRlu/8qvfJb/9vkNcXaeG1ibb22sXZeu1h7r32sg9ch1tHrGCvqk1Ff+pk1D9oHDYQWQhOhjdBIaCUKTGomCy9qJjWTmknNpGZSM6mZLDDThzm9AQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [RH = _t, Values = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"RH", type text}, {"Values", type text}}),
    gourp= Table.Group(#"Changed Type", {"Values"}, {{"RH", each """" & Text.Combine(List.Transform(_[NumberColumn], (x) => Number.ToText(x)), ",") & """", type text}}),
    #"Replaced Errors" = Table.ReplaceErrorValues(gourp, {{"RH", "0"}})
in
    #"Replaced Errors"
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors