Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mathc fieldvalue from two other tables

Hi all!

Could you help me with this issue:

I have two tables:

Color

Green

Red

Orange

Yellow

Other

Item

Sweater for girls Green

dress  Red

Bag Orange apple

Yellow coat

Blue jeans

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?

1 Solution

Accepted Solutions
danieloberbilli
Specialist II
Specialist II

Capture23.PNG.pngPlease find QVW with solution attached.

View solution in original post

4 Replies
vgutkovsky
Master II
Master II

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

danieloberbilli
Specialist II
Specialist II

Capture23.PNG.pngPlease find QVW with solution attached.

Not applicable
Author

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!

Not applicable
Author

Hi Daniel! Thank you! I like it!