Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
Showing results for 
Search instead for 
Did you mean: 

Filter text field using variable input

Hello everyone,

I've got a database that contains a date, a text field (string), a label field (integer), and a result field (float). My first step was to plot an average of results where label = 1, for this I easily managed to do it by running Avg({<label={1}>}result) ... but this computes the average over all rows. Now, I'd like it to run only over certain rows for which the text field contains a specific keyword (to be entered by the user, it could be any word).

So I created a variable input called keyword and I'm trying to add to my formula this step that would say: fetch all text entries that contain this keyword and perform Avg({<label={1}>}result) for this selection.

Any thoughts on how to achieve that? I read about WildMatch and how to call a variable input '*$(keyword)*' but cannot figure out if that's what I should use and how to place it in the Avg() formula. 

Many thanks 🙂

Labels (4)
2 Replies

@joss_g  may be this

Avg({<label={1}, keyword_field = {"*$(keyword_variable)*"}>}result) 


I've been playing around with filters and tried to filter a text variable to find all elements that matched partially the text input. ... If the text field is {{text_here}} and then you use the regex command in the provided box it will work, but that's a pain .