Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Thanks,
I wouldn't use crossing tables....there is anyalternative way?
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
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"
Can you try this:
left(PurgeChar(Esito [Att]"&'-'&"Sottoesito [Att],'-'),3)
Regards,
Kiran.
this is not solving the problem...could you help me? thanks
I didn't solve the problem...anyone could help me?
Thanks
Can you load example application.
Regards,
Kiran.
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.
BI Consultant