Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an expression that I wish to calculate on a field.
If TRADE_TYPE = Basis Swap then multiply PAYMENT_QTY*(PRICE1-PRICE2)
If TRADE_TYPE = Swap then multiply PAYMENT_QTY*PRICE1
I have created the following expressions for the above, however I am unsure how to express them as a multiple IF statement:
Sum({<TRADE_TYPE={'Basis Swap'}>}PRICE1-PRICE2)*PAYMENT_QTY
Sum({<TRADE_TYPE={'Swap'}>}PRICE1*PAYMENT_QTY
Any help would be much appreciated.
Thanks,
Daniel
Hi Dathu.qv,
I have another quick question with regards to the above expression. How do I add where CO_CD is not equal to ICEClearingGS, ImarexClearing and STShippingTranPteLtd?
I thought I needed to add the following, but it doesn't work:
SUM( IF(TRADE_TYPE='Swap' AND COST_REVENUE_IND='Cost (Payable)' AND CO_CD={'*'}-{'ICEClearingGS','ImarexClearingGS','STShippingTranPteLtd'} , PAYMENT_QTY*(-PRICE1) , IF(TRADE_TYPE='Swap' AND COST_REVENUE_IND='Revenue (Receivable)' ,PAYMENT_QTY*PRICE2 ,0 ) ))
Thanks for your help,
Regards,
Daniel