Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
ID | Name | city | Hobby |
---|---|---|---|
1 | Jack | London | I like to play football |
2 | John | Paris | i like to play basketball |
3 | Alex | Newyork | i like to play football |
4 | James | Chicago | i like to play tennis |
5 | Dave | SF | i 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
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.
Regards,
Vivek
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
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.
Regards,
Vivek
Thank you Vivek. Works like a charm