Custom Formula - Zoho Analytics

Custom Formula - Zoho Analytics

Hi,

I want to see profit% for each customer. However the aggregate formula on the tool is not the most accurate as it ignores purchase discounts all together and gives the % on Sale Price and not Purchase Price. 

I tried adding custom formula but could not derive at a solution. 

((Sale Price (-discount) - Purchase Price (-discount) )/Purchase Price (-discount))*100

Is there any solution for this?

As currently I am manually doing it