💬How to replace null values with 0

Use an IF statement or Find Replace tool to replace null values

By utilizing an IF Statement in conjunction with ISNULL, you can easily replace any null values with 0.

Null values in a table

The syntax for this is simply: IF(ISNULL([column]), 0, [column]).

Using the Expression Editor to write an IF statement

This statement will check to see if the value is null. If it is, it will replace it with 0; on the other hand, if not, it will preserve the original value in the column being tested.

All null values are replaced with a zero in a calculated column
circle-info

Remember to use the Edit Columns tool to add a new calculated column with the ISNULL function.

Another Method - Find Replace

You may also find it easier to use a Find Replace tool to replace all null values in the entire table, or in specific columns with your desired value; in our case, 0.

All null values are replaced with a zero in their origin column
chevron-rightHow can I substitute null values with 0?hashtag

You can substitute null values with 0 by using an IF Statement in conjunction with ISNULL, or by using the Find Replace tool.

chevron-rightWhat is the IF syntax for replacing null values with 0?hashtag

The syntax to include in an IF statement to replace null values with 0 is IF(ISNULL([column]), 0, [column]).

Other Sources

IFchevron-rightISNULLchevron-rightFind/Replacechevron-right

Last updated

Was this helpful?