Div Zero message when trying to create calculated field in Business insights Explorer.

SUGGESTED

I want to create a calculated field (say Gross Margin) in the Item View Explorer.  Calculation would be (Standard Price- Last cost)/Last Cost.  However there are several items that do not have a last cost yet because there has not been any inventory produced or purchased yet.  So I am getting the "Div zero" message. Has anyone run into this and found a calculation that takes into consideration if any of the fields in the calculation contain a zero and that works?