Skip to main content
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display only selected items from a subset limited by Set Analysis

Hi, I have a list of sales records which are identified via their BatchCode and have created an expression to display them on a BarChart as follows:

=Sum({<BatchCode={"ABC-001","ABG-002","AFG-005","XYZ-135","LMN-142".. }>}Revenue

I have a List Box object that I use to list specific BatchCodes which I would like to analyze. The expression is as follows:



or BatchCode='ABG-002'

or BatchCode='AFG-005'

or BatchCode='XYZ-135'

or BatchCode='LMN-142'



Currently, all my BatchCodes in the above set will always be shown, regardless of which BatchCodes I select.

I would like to display only BatchCode(s) from this subset which I select, instead of displaying the entire list of BatchCodes.

How should I change my expression to enable this?

Thanks in advance!

2 Replies
Master III
Master III


got it solved? if not, you can try this..

Create one variable and assign the concat value of your Batch code. Like

Variable  :  v1

Definition : =Concat(DISTINCT chr(34)&BatchCode&chr(34),',')

Expression : sum({<BatchCode={$(v1)}>}Revenue)



You can create same field in Script


if(wildmatch(BatchCode,'ABC-001','ABG-002','AFG-005'),BatchCode) as New_BatchCode

Use above field in Front End list box


For Expression you can write



Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂