Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
josh_bee
Contributor
Contributor

Filter based on substring in field

Hi,

I'm building an app to show feedback according to particular themes, where each piece of feedback is assigned one or multiple themes.

Is there a way to have a master dimension with the possible theme values, and use a substring search on the field(or another method) to show any comment that has been tagged with the selected value/s?

Example structure is a table with:

observation | themes

"comment 1" | ['Leadership', 'Culture']

"comment 2" | ['Leadership', 'ICT', 'Policies/Processes']

"comment 3" | ['Leadership']

Is there a way to use a filter box:

- Leadership

- Culture

- ICT

- Policies/Processes

Such that if Leadership was chosen, all three would show, if ICT and Culture then comments 1 and 2, Culture comment 1 etc?

The data is currently tagged with a list of themes in python before being imported into Qlik.

Thanks for your help

Labels (1)
3 Replies
Taoufiq_Zarra

yes you can get these results in the load script using Subfield

for example :

Data:

load subfield(themes,',') as Sub_Themes,rowNo() as ID,* inline [
observation | themes

"comment 1" | "Leadership, Culture"

"comment 2" | "Leadership, ICT, Policies/Processes"

"comment 3" | "Leadership"
](delimiter is '|') ;

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
josh_bee
Contributor
Contributor
Author

Thanks for the suggestion Taoufiq, it's definitely a lot closer.

This generates a list of subthemes and duplicate records for each of the observations, however, as a result, the additive filtering doesn't work. E.g. if you select two subthemes, the filter returns the entire set instead of just the intersection.

Any ideas for a workaround?

Taoufiq_Zarra

Can you give me some examples ?


are you ok for an UI solution instead of the script solution ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉