When you use the IIf built-in function, both sides of the expression are evaluated during the processing. To avoid issues if one of the sides contains division by zero, I can suggest using ?: conditional operator instead.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items