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

Hi @bhumika18s

It’s been a while since we last heard from you. If you have any further questions, please let us know how we can assist you.

If we don’t hear back within the next 3 business days, we’ll proceed with close/archive this topic.

Thank you!

Hi @bhumika18s

Since we have not heard back from you, I’ll go ahead and close this topic. However, if you have any additional questions, feel free to create a new topic in the community and link this discussion for relevant information.

Thank you!