You would want to handle this in your calculation. You are running into a division by zero here. Might need to see your exact calculation, but when you are doing division you need to check for this with say an IIF statement like the following:
Depending on the version of SSAS you are using and not sure if you are doing multidimensional or tabular, but you can also use DIVIDE function as well now.
You can then decide if you want to display empty values in your analytical report or not.
If you want to return a zero in the measure you wouldn't want to do it in the calc because of performance, but you could do it in the FORMAT_STRING if you are doing multidimensional. You can specify how to handle zero and null values with the FORMAT_STRING settings.