Another ides is to mathematics to solve
Another ides is to mathematics to solve the problem; the query parser will not carry out a formula in a multiplication is the first operand is NULL or 0 so we can multiply and divide out and that will be much quick than IIF (see Mosha for more details).
e.g.
MEMBER [Measures].[CheckDivByZero] AS
[Measures].[ZeroValuePerUnit] * (
[Measures].[Internet Sales Amount]/[Measures].[ZeroValuePerUnit])
) / [Measures].[ZeroValuePerUnit]
,Format_String = '#.#0'