Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
patriciousa
Creator II
Creator II

Replace values under column in script

HI everyone. I have searched and used every post in this forum but nothing seems to work on me.

I love the app is easy to use and Im already creating some good graphs. Now i have this issue:

MY script:

load

name,

sale

from excel1;

load

name,

sale

from excel2;

load

name,

sale

from excel3;

the sale column has only 2 possibles values, Y or N.

i Want to change the Y to  Yes and the N to No in qlik sense. I could do it easily by doing ctrl+f in each excel but i want to do it in qlik.

thank you

regards.

1 Solution

Accepted Solutions
brunobertels
Master
Master

Hi Patricio

Try this in each load script :

MY script:

load

name,

sale,

if(sale='Y','YES','NO') as SALE_long_value

from excel1;

etc with excel 2 and Excel 3

Regards

Bruno

View solution in original post

6 Replies
brunobertels
Master
Master

Hi Patricio

Try this in each load script :

MY script:

load

name,

sale,

if(sale='Y','YES','NO') as SALE_long_value

from excel1;

etc with excel 2 and Excel 3

Regards

Bruno

patriciousa
Creator II
Creator II
Author

‌thank you for your reply bruno but I'm receiving an error message that there is an error when I add what you said.

thank you

regards

patriciousa
Creator II
Creator II
Author

‌my bad bruno. It did work. Thank you very much.

brunobertels
Master
Master

hi

Can you copy past the error message and may be post here a sample of your excel file ?

Bruno

brunobertels
Master
Master

perhaps it's just the single quote arround the Y

try this :

MY script:

load

name,

sale,

if(sale=Y,'YES','NO') as SALE_long_value

from excel1;

brunobertels
Master
Master

nice to read it works