Issue creating IfElse formula

I am rather new to Sugar so need a bit of help with this IfElse:

I have a calculated field on Quote module that I want to be the Unit Price of a Quoted Line Item if the Line Item is of the value of X; otherwise, the value will be "$0.00" (but no currency symbol as the field's type is Currency).

My formula:

ifElse(equal(related($revenuelineitems,"name","X."),related($revenuelineitems,"discount_price"),"0.00"))

Error:

Invalid Formula
Cannot read property 'returnType' of undefined