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

Concat

Hi all,

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

Esito has 2 values "OK/KO" and Sottoesito has 2 values "BLOCCANTE/NON BLOCCANTE" so I will have 3 combinations

- OK-

- KO-BLOCCANTE

- KO- NON BLOCCANTE

I would then renominate them into:

- OK- = OK

- KO-BLOCCANTE= KOB

- KO-NON BLOCCANTE= KON

I have no idea how to proceed, could you help me?

Thanks

Bruno

9 Replies
matt_crowther
Luminary Alumni
Luminary Alumni

Bruno,

In the help file look at a section called 'mapping' this allows you to replace one value in a field with another, for example 'OK-' with 'OK' and so on.

To get the combined new column simply use: Estio&'-'&Sottoestio as My_New_Column; in the load script then simply apply the mapping as per the Help File.

All the best,

Matt - Visual Analytics Ltd

Not applicable
Author

Thanks,

I wouldn't use crossing tables....there is anyalternative  way?

matt_crowther
Luminary Alumni
Luminary Alumni

You could always simply use a multiple if() statement in the load script eg:

if(Estio&'-'&Sottoestio='OK-','OK',if(Estio&'-'&Sottoestio='KO-BLOCCANTE','KOB','KON'))

Hope that helps,

Matt - Visual Analytics Ltd

Not applicable
Author

i wrote it in this way but is not working

If ("Esito [Att]"&'-'&"Sottoesito [Att]"='OK-','OK',if("Esito [Att]"&'-'&"Sottoesito [Att]"='KO-NONBLOCCANTE','KON','KOB')) as "AAA"

Not applicable
Author

Can you try this:

left(PurgeChar(Esito [Att]"&'-'&"Sottoesito [Att],'-'),3)

Regards,

Kiran.

Not applicable
Author

this is not solving the problem...could you help me? thanks

Not applicable
Author

I didn't solve the problem...anyone could help me?

Thanks

Not applicable
Author

Can you load example application.

Regards,

Kiran.

Miguel_Angel_Baeyens

Hi,

You can give a try to the following in the script, but is better off using a mapping table and a MapSubString() function:

Pick(Match("Esito [Att]"&'-'&"Sottoesito [Att]", 'OK-', 'KO-NONBLOCCANTE', 'KO-BLOCCANTE'), 'OK', 'KON', 'KOB') AS AAA,

Note both field names and values are case sensitive in QlikView, hence the condition may not be working.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica