Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello World,
Please, Can you tell me how I can optimize the expression bellow?
if(Identificador_Cuenta = 'Deudora',
if (Acumula_Saldo = {'1'},
Sum({<Mes =, Año = , Identificador_Mes = {'<=$(#=vMesActual)'}, Tipo_Cuenta = {'D'}>}Valor_Cuenta)
- Sum({<Mes =, Año = , Identificador_Mes = {'<=$(#=vMesActual)'}, Tipo_Cuenta = {'C'}>}Valor_Cuenta)
,
Sum({<Mes =, Identificador_Mes = {'<=$(#=vMesActual)'}, Tipo_Cuenta = {'D'}>}Valor_Cuenta)
- Sum({<Mes =, Identificador_Mes = {'<=$(#=vMesActual)'}, Tipo_Cuenta = {'C'}>}Valor_Cuenta)
)
,
if (Acumula_Saldo = {'1'},
Sum({<Mes =, Año = , Identificador_Mes = {'<=$(#=vMesActual)'}, Tipo_Cuenta = {'C'}>}Valor_Cuenta)
- Sum({<Mes =, Año = , Identificador_Mes = {'<=$(#=vMesActual)'}, Tipo_Cuenta = {'D'}>}Valor_Cuenta)
,
Sum({<Mes =, Identificador_Mes = {'<=$(#=vMesActual)'}, Tipo_Cuenta = {'C'}>}Valor_Cuenta)
- Sum({<Mes =, Identificador_Mes = {'<=$(#=vMesActual)'}, Tipo_Cuenta = {'D'}>}Valor_Cuenta)
)
)
The differences are in red.
Can you create 2 variables for:
Tipo_Cuenta and Año as:
vTipo and vAño
Provide them values as 'C'/'D' and */$ based on value for the 2 fields:
'Identificador_Cuenta' and 'Acumula_Saldo'
Hence there won't be any need to use If with set analysis statements