This content has been marked as final.
Show 3 replies

1. Re: Zero in the denominator
Joe Oppelt Mar 29, 2018 12:49 PM (in response to Kelly McGrady)IF SUM(PLAN) = 0 then 1
else
SUM(ACTUAL)/SUM(PLAN)
ENDSomething like that.

2. Re: Zero in the denominator
Kelly McGrady Mar 29, 2018 12:55 PM (in response to Joe Oppelt)Yeah I forgot the else portion of that thank you

3. Re: Zero in the denominator
Jim Dehner Mar 29, 2018 12:55 PM (in response to Kelly McGrady)Hi Kelly
Tableau will return a Null if it tries to divide by zero  so ifnull(attr(calculation),1) will return a 1 but when you bring it to the viz tableau will aggregate it so you will need to take a Max(), Min() or Avg()
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.