Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all!
Could you help me with this issue:
I have two tables:
Color | |||||
---|---|---|---|---|---|
|
Item | |||||
---|---|---|---|---|---|
|
The result I'm looking for after comparing these tables would then look like this:
Field1 | Field2 |
Sweater Green for girls | Green |
dress Red | Red |
Yellow coat | Yellow |
Bag Orange apple | Orange |
Blue jeans | Other |
Which is the best way to do it?
Please find QVW with solution attached.
Ksenia, if this is, in fact, the full extent of the problem, just code it manually using substringcount. For example:
if(substringcount(Item,'Red')>0,
'Red',
if(substringcount(Item,'Green')>0,
'Green',
....
) as Field2
If your real data is more extensive (as I'm guessing is the case), take a look at Rob Wunderlich's QlikView Cookbook. Specifically, the mappingWithWildcards.qvw example.
Regards,
Vlad
Please find QVW with solution attached.
Hi Vlad!
Thanks for your answer. You are right, it is a only simple example, i have more extensive data and it may change.
Thanks for advice, i'll take a look this book surely!
Hi Daniel! Thank you! I like it!