Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
EliasOrtega
Contributor II
Contributor II

Excluir dos cuentas en el script, de un país en específico

Hola a todos, 

 

Por favor les pido su apoyo con la siguiente situación:

Tengo una cantidad de cuentas contables donde necesito excluir dos cuentas contables, una que termina en "1" y otro que termina en "2". Las siguientes:

- 0011071001

- 0011071002

 

Estas dos cuentas está asociada a varios países, por lo tanto no puedo excluirlas de todos, solo necesito excluirla de Brasil. La formula que hice fue la siguiente, pero no me funciona:

 

if ( Right( "0GL_ACCOUNT",1)= 0 , "0DEB_CRE_L2", if ( Right( "0GL_ACCOUNT",1)<> 0 and Pais='Brasil' , 0, "0DEB_CRE_L2")) as "0GL_ACCOUNT"

0GL_ACCOUNT =campo de cuenta contable

0DEB_CRE_L2 = campo de saldo (dolares)

 

¿Saben donde está la falla? El script no me corre 😞

 

 

Labels (5)
4 Replies
TcnCunha_M
Creator III
Creator III

Try like this:
if ( wildmatch('0011071001','0011071002') > 0 And Country='Brasil', 0 ,"0DEB_CRE_L2") As   "0GL_ACCOUNT"
 
As you think, so shall you become.
Ahidhar
Creator III
Creator III

see if this works ,

if(match(right("0GL_ACCOUNT",1),1,2) and Country='Brasil',0,"0DEB_CRE_L2")

EliasOrtega
Contributor II
Contributor II
Author

Hi There,

 

Thank you very much, I appreciate it. I just had to eliminate from the script above "0GL_ACCOUNT"because I was repeating it twice.

EliasOrtega
Contributor II
Contributor II
Author

Hi There,

 

Thank you very much, I appreciate it. It didn't work this way, but I think I am doing something wrong with the "fields". I tried another way and it worked. 

 

Best,