Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Luminary
Luminary

Concat

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

Highlighted
Not applicable

Concat

Thanks,

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

Highlighted
Luminary
Luminary

Concat

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

Highlighted
Not applicable

Concat

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"

Highlighted
Not applicable

Concat

Can you try this:

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

Regards,

Kiran.

Highlighted
Not applicable

Concat

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

Highlighted
Not applicable

Concat

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

Thanks

Highlighted
Not applicable

Re: Concat

Can you load example application.

Regards,

Kiran.

Highlighted

Re: Concat

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