Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Adding new value to the column through script.

Hi,

I have a field called Gender type with values Male and Female.I want to add one more value called 'NA' to the filed Gender Type.How can I do this through sctipting,

Ex.List box.

   

Gender type

Male

Female.

I want this list box look like,

Gender Type

Male

Female

NA

Thanks in advance.

1 Solution

Accepted Solutions
antoniotiman
Honored Contributor III

Re: Adding new value to the column through script.

Hi,

Load Name,
If(Match(Gender,'Male','Female'),Gender,'NA') As Gender
Inline [
Name,Gender
Maria,Female
Mario,Male
Andrea,
John,Male
Bibi,
]
;

Immagine.png

Regards

4 Replies

Re: Adding new value to the column through script.

Load [Gender type ] resident tab1;

concatenate

Load 'NA' as [Gender type ];

krishna_2644
Valued Contributor III

Re: Adding new value to the column through script.

Another version:

tab:

load * inline [

gender

male

female

];

concatenate

load * inline [

gender

NA

] ;

Gabriel
Valued Contributor II

Re: Adding new value to the column through script.

Hi,

This will work

GENDER:

LOAD * INLINE [

    Gender

    Male

    Female

];

Concatenate(GENDER)

LOAD * Inline [

Gender

'NA'

];

antoniotiman
Honored Contributor III

Re: Adding new value to the column through script.

Hi,

Load Name,
If(Match(Gender,'Male','Female'),Gender,'NA') As Gender
Inline [
Name,Gender
Maria,Female
Mario,Male
Andrea,
John,Male
Bibi,
]
;

Immagine.png

Regards

Community Browser