Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

New field as check list

Hi all,

I got two text fields to be concatenated in the following way in a new field: "Esito [Att]"-"Sottoesito" [Att]".

"Esito [Att]" has 2 values:

- OK

- KO

"Sottoesito [Att]" has 2 values:

- BLOCCANTE

- NON BLOCCANTE

I need to create a new field where I will have:

- OK If  "Esito [Att]"=OK

- KON If  "Esito [Att]"=KO AND "Sottoesito [Att]"=NON BLOCCANTE

- KOB If  "Esito [Att]"=KO AND "Sottoesito [Att]"=BLOCCANTE

Thanks in advance

Bruno

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think you mostly have done it yourself:

LOAD

...

if("Esito [Att]" = 'OK', 'OK'

                                 , if("Sottoesito [Att]" = 'NON BLOCCANTE', 'KON','KOB')) as NEWFIELD,

....


FROM ...;

Hope this helps,

Stefan

View solution in original post

6 Replies
its_anandrjs

Hi,

You have to write code some thing like below in load script to concat two field.

Load

..

..

Field1 & ' - ' & Flied2 as Concat field

From Data

Rgds

Anand

swuehl
MVP
MVP

I think you mostly have done it yourself:

LOAD

...

if("Esito [Att]" = 'OK', 'OK'

                                 , if("Sottoesito [Att]" = 'NON BLOCCANTE', 'KON','KOB')) as NEWFIELD,

....


FROM ...;

Hope this helps,

Stefan

its_anandrjs

Hi,

Or you can do like

Load

....

....

If(  "Esito [Att]" = OK) as OK,

If(  "Esito [Att]" = KO AND "Sottoesito [Att]" = NON BLOCCANTE ) as KON,

If(  "Esito [Att]" = KO AND "Sottoesito [Att]" = BLOCCANTE ) as  KOB

....

From Data

Rgds

Anand

Not applicable
Author

And how can i put all togheter in a New Field?

Thanks

swuehl
MVP
MVP

Hm,

with my above posting you should have one NEWFIELD with three possible values (OK, KON, KOB)...

Stefan

its_anandrjs

Hi,

You can use

Load

....

If(  "Esito [Att]" = OK, 'OK'),

If(  "Esito [Att]" = KO  AND "Sottoesito [Att]" = NON BLOCCANTE, 'KON'),

If(  "Esito [Att]" = KO  AND "Sottoesito [Att]" = BLOCCANTE, 'KOB' ))) as  NewField

....

From Data

Rgds

Anand