Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

patriciousa
Contributor

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
Valued Contributor

Re: Replace values under column in script

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

6 Replies
brunobertels
Valued Contributor

Re: Replace values under column in script

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
Contributor

Re: Replace values under column in script

‌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
Contributor

Re: Replace values under column in script

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

brunobertels
Valued Contributor

Re: Replace values under column in script

hi

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

Bruno

brunobertels
Valued Contributor

Re: Replace values under column in script

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
Valued Contributor

Re: Replace values under column in script

nice to read it works