Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following expression and I can't seem to get it to work:
=If(strategy_ref = 'Physical' and Count(trade_type_group_cd ='Future',trade_num)>0 and compliance_checked_flg ='N','Y','N')
It would be much appreciated if someone could point out where I am going wrong.
Regards,
Daniel
Yes, I can help you here
=If((strategy_ref = 'Physical' and Count({<trade_type_group_cd ={'Future'}>} trade_num)>0 and compliance_checked_flg ='N') or (strategy_ref = 'Hedge' and Count({<trade_type_group_cd ={'Physical'}>} trade_num)=0 and compliance_checked_flg ='N') or (strategy_ref = 'Trading' and Count({<trade_type_group_cd ='Physical'}>} trade_num)>0 and compliance_checked_flg ='N')
,'Y','N')
Try this
=If(strategy_ref = 'Physical' and Count({<trade_type_group_cd ={'Future'}>} trade_num)>0 and compliance_checked_flg ='N','Y','N')
it seems you don't know the set analysis syntax
but where are you writing this in script or on chart
if on chart then you need to write your expression as follows:
if(strategy_ref = 'Physical' and count({<trade_type_group_cd={'Future'>}trade_num) >0 and compliance_checked_flg='N' ,'Y','N')
Hi Anil/Ali,
Thank you both for your help. That now works perfectly.
Are you able to help with adding the below:
=If(strategy_ref = 'Physical' and Count({<trade_type_group_cd ={'Future'}>} trade_num)>0 and compliance_checked_flg ='N','Y','N') or
If(strategy_ref = 'Hedge' and Count({<trade_type_group_cd ={'Physical'}>} trade_num)=0 and compliance_checked_flg ='N','Y','N') or
If(strategy_ref = 'Trading' and Count({<trade_type_group_cd ={'Physical'}>} trade_num)>0 and compliance_checked_flg ='N','Y','N')
Regards,
Daniel
Yes, I can help you here
=If((strategy_ref = 'Physical' and Count({<trade_type_group_cd ={'Future'}>} trade_num)>0 and compliance_checked_flg ='N') or (strategy_ref = 'Hedge' and Count({<trade_type_group_cd ={'Physical'}>} trade_num)=0 and compliance_checked_flg ='N') or (strategy_ref = 'Trading' and Count({<trade_type_group_cd ='Physical'}>} trade_num)>0 and compliance_checked_flg ='N')
,'Y','N')
Hi Anil,
Thank you for your help, that all worked perfectly.
As a last favour, would it be possible to explain how to use the code in the LOAD statement?
Regards,
Daniel
Why not calling as field name?
If((strategy_ref = 'Physical' and Count({<trade_type_group_cd ={'Future'}>} trade_num)>0 and compliance_checked_flg ='N') or (strategy_ref = 'Hedge' and Count({<trade_type_group_cd ={'Physical'}>} trade_num)=0 and compliance_checked_flg ='N') or (strategy_ref = 'Trading' and Count({<trade_type_group_cd ='Physical'}>} trade_num)>0 and compliance_checked_flg ='N')
,'Y','N') as FieldName
Note - Please close this thread, If you found what you looking