Calculation blank instead of 0

262
1
Jump to solution
11-10-2023 11:25 AM
NatalieSlayden
New Contributor III

I have a integer field where I calculate a percent based on two other fields. If they enter zero for both, the percent is blank rather than displaying as 0. Is there any work around for this? 

 

(0/0)*100 = Blank 

instead of 

(0/0)*100 = 0 

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

That is because you cannot divide by 0 in math.  Add an if statement that should work.  Like if(denominator is 0, 0 , else do the calc).

https://en.wikipedia.org/wiki/Division_by_zero 

Hope that helps.

View solution in original post

1 Reply
DougBrowning
MVP Esteemed Contributor

That is because you cannot divide by 0 in math.  Add an if statement that should work.  Like if(denominator is 0, 0 , else do the calc).

https://en.wikipedia.org/wiki/Division_by_zero 

Hope that helps.