To replace an odd result of #DIV/0! on formula (Cell A1 - Cell B1)/Cell A1 when A1 is 0, we can use =if function such that if Cell A1 = 0, the result is "-", otherwise, proceed.

However, I can't do the same with Pivot Table calculated field using the if function as I read that the result must be number and not text like "-".

Please advise if there is any way to get around it. Many thanks in advance.