Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter rows based on words in description

Hello,

I'm loading an Excel document with some "search terms". I'm also loading a table with a description column. I want to only load the rows of this table where the description contains one of the search terms loaded from the Excel file.

I can't really use exists() here because the fields aren't identical (the search terms from the Excel file are moslty merely one word while the description is often a sentence).

4 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Have you tried using wild card search? Can you provide the sample files, I can try this one for you.

In QV you can use :

* Zero or more characters.

? Any single character.

Cheers - DV

Not applicable
Author

Hi,

if u don't have too much record u can try this.

It's the first stupid idea i had.

After last load in the script, u can delete my new dimension to reserve memmory space.

Let me know.

Not applicable
Author

Good idea, but I have way too many records. I solved it by making the selection outside of QlikView, then.

Not applicable
Author

You could do something like this. If the excel file contains a lot of records there are likely better ways to do it

seach_terms:

load Seach_term from xxx.xls;

let condition_string='index(description,'& peek('Seach_term',0,'seach_terms')&')>0';

for counter=1 to noofrows('description')-1

     let condition_string='$(condition_string)'&' or index(description,'& peek('Seach_term',$(counter),'seach_terms') &')>0'

next counter

data:

load xxx,description from xxx where $(condition_string);