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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
dzzxyzz
New Member

Replacing nulls with Error

Hi, I have a relatively simple problem to solve but can't find the solution anywhere.

How can I replace null values in a particular column with Error values?

Thanks!

5 REPLIES 5
v-henryk-mstf
Community Support
Community Support

 

The first thing to note is that a field can only have one data type. If it is a numeric type, then the null value cannot be converted to error (text type).

vhenrykmstf_0-1647572366069.pngvhenrykmstf_1-1647572466522.png

If the field type is text, then the easiest way is to use replace value in the power query.

vhenrykmstf_2-1647573536959.png

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

I want to replace null values with error values - not a string that displays "error"........

Vera_33
Resident Rockstar
Resident Rockstar

Hi @dzzxyzz 

 

If you literarily want to show "Error" this word

Vera_33_0-1647389643728.png

 

No I do not want to show Error as a string, I want to specify an error as the cell value........

Hi @dzzxyzz 

 

I am not sure why you want an error, but you can do like this, transform your current column

Table.TransformColumns(yourPreviousStep,{{"yourColumn", each if _=null then Text.PositionOf(_,"a") else _}})

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.