Skip to main content
Announcements
Marching toward a simplified navigation! READ ON
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Keyword search


Hi all, I am new to qlikview( 2 days)  and I would appreciate help with the challenge I am currently facing.

I have a below table

IDNamecityHobby
1JackLondonI like to play football
2JohnParisi like to play basketball
3AlexNewyorki like to play football
4JamesChicagoi like to play tennis
5DaveSFi like to play tennis

I have a keyword field having the value 'football' and 'tennis'. When user clicks on either of these two values, I need to pull up the particular record. For example, if the user clicks on football, I need to display records 1 and 3. Can someone guide me how to go about this task? I tried searching and couldn't find a similar thread, but kindly point me to one if it exist.

Thank you

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Plz find attached QVW.

just load the data as it is.

create one variable vKeyWord=if(GetSelectedCount(KeyWord)=0,' ',GetFieldSelections(KeyWord))

then make a straight table

take name, id, city as dimension

and

=if(SubStringCount(Hobby,vKeyWord)<>0,Hobby) as expression

and supress null values

Output will be like this.

kw1.png

kw2.png

kw3.png

Regards,

Vivek

View solution in original post

4 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Have a look at the below post.

http://community.qlik.com/docs/DOC-4587

Regards

ASHFAQ

datanibbler
Champion
Champion

Hi Ravichandran,

usually, as long as the tables are linked, you would be able to make selections and the corresp. records would appear highlighted.

In this case, however, the keyword you want to look for is "hidden" in the text in the >Hobby< field. There are several possibilities, but I think the easiest would be to isolate that keyword (the name of a sport) and to make another field of that - that way, you will again be able to select it easily.

I guess there need not necessarily be exactly four words ("I like to play") in front of the sports_name? If not, then you will need to use a combination of different string functions to isolate that.

HTH

Best regards,

DataNibbler

Not applicable
Author

Hi,

Plz find attached QVW.

just load the data as it is.

create one variable vKeyWord=if(GetSelectedCount(KeyWord)=0,' ',GetFieldSelections(KeyWord))

then make a straight table

take name, id, city as dimension

and

=if(SubStringCount(Hobby,vKeyWord)<>0,Hobby) as expression

and supress null values

Output will be like this.

kw1.png

kw2.png

kw3.png

Regards,

Vivek

Not applicable
Author

Thank you Vivek. Works like a charm