Calculated formula fo subtracting 2 fields is not working when one of the field is null

Value from Data is coming as null , so when i am writing the calculated field as let’s say A-B and A has some non-zero value but B is null then A-B is showing as null
wherein it should show the value fo A

Hi @bhumika18s ,
quick workaround on this

You see two calculated fields in the table, one has the behavior you’re indicating, the other one is correct.

This is how the two fields are calculated. Adding the ifelse statement to check if the field is null solves your problem.

Difference_With_null = {field_A}-{field_B}

Difference_Without_Nulls = ifelse(isNull({field_A}),0,{field_A})-ifelse(isNull({field_B}),0,{field_B})

Hope this helps :slight_smile:
Andrea