Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

chrisgoudy
New Contributor II

Changing Script so F becomes Female, M - Male

In my ListBox, I want the letter F to show up as Female, M as Male otherwise Unknown.

How do I edit the script to do that. I have an idea, but I'm not sure about everything I need to include.

This is what i'm thinking I need to include. I know I don't have the M, Male included or the unknown.

@30 as Gender (F, Female)

What do I need to add or change about this?

9 Replies

Re: Changing Script so F becomes Female, M - Male

Hi,

     Try as follows.

     Load if(Gender = 'M','Male', If(Gender = 'F', 'Female','Unkown')) as Gender_Name

     From xyz.

     For your case Gender should be replaced by @30

Regards,

Kaushik Solanki

chrisgoudy
New Contributor II

Changing Script so F becomes Female, M - Male

so in the script you sent I should replace Gender with @30?

Such as

Load if(@30 = 'M','Male', If(@30 = 'F', 'Female','Unkown')) as Gender_Name

     From xyz.

Changing Script so F becomes Female, M - Male

Hi,

     Yes you are right.

Regards,

Kaushik Solanki

chrisgoudy
New Contributor II

Changing Script so F becomes Female, M - Male

Doesn't seem to be working for me. The Letters F and M haven't changed to Female and Male

eliran_s
Contributor II

Changing Script so F becomes Female, M - Male

Hi,

Maybe add an example since Kaushik's method is a correct one.

Eliran.

chrisgoudy
New Contributor II

Changing Script so F becomes Female, M - Male

what do you mean by add an example?

kamalqlik
Valued Contributor

Changing Script so F becomes Female, M - Male

Can you upload your application here ,so we can make changes here.

regards

Kamal

eliran_s
Contributor II

Re: Changing Script so F becomes Female, M - Male

You can attach a file (qvw) like I'm doing right now.

See the script I have attached.

Hope it helps,

Eliran.

Not applicable

Re: Changing Script so F becomes Female, M - Male

You need to use the new field name rather than the @30 field name.  So if you're looking at a list box make sure it's for Gender_Name rather than @30