I am trying to create a computed field as follows. @compif
Forums
Hi,
I am trying to create a computed field as follows.
@CompIf( PRE_PRO =6 .and. PRE_MONEDA = 0 .and. VAL_MES <=36, ACR_CAPVIGENTE *(2.5/100),PRE_PRO =21 .and. PRE_MONEDA = 2 .and. VAL_MES <=36, ACR_CAPVIGENTE *(2/100), PRE_PRO =7 .and. PRE_MONEDA = 0 .and. VAL_MES <=36, ACR_CAPVIGENTE *(2.5/100),PRE_PRO =7 .and. PRE_MONEDA = 2 .and. VAL_MES <=36, ACR_CAPVIGENTE *(2.5/100), PRE_PRO = 8 .and. PRE_MONEDA = 0 .and. VAL_MES <=36, ACR_CAPVIGENTE *(3/100),PRE_PRO = 8 .and. PRE_MONEDA = 2 .and. VAL_MES <=36, ACR_CAPVIGENTE *(2/100), 0 )
but it throws me an error Number of parameters incorrect.
Could someone help me make a script with these commands, to execute it on the idea table and save the computed field.
for example.
IF PRE_PRO =6 .and. PRE_MONEDA = 0 .and. VAL_MES <=36
PENALIDAD = ACR_CAPVIGENTE *(2.5/100)
ELSE
IF PRE_PRO =21 .and. PRE_MONEDA = 2 .and. VAL_MES <=36
PENALIDAD = CR_CAPVIGENTE *(2/100)
.....
You are lacking one last
You are lacking one last parameter. I assume that if it none of the statements are true you want to return 0? To do this instead of just the 0 add (1, 0). The 1 returns true and then it will return 0, that is the parameter you are missing.