Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
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:

=Aggr(

if(BatchCode='ABC-001'

or BatchCode='ABG-002'

or BatchCode='AFG-005'

or BatchCode='XYZ-135'

or BatchCode='LMN-142'

...

,BatchCode),BatchCode)

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
settu_periasamy
Master III
Master III

Hi,

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)

PrashantSangle

Hi,

You can create same field in Script

like

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

Use above field in Front End list box

Aggr(New_BatchCode,New_BatchCode)

For Expression you can write

Sum({<BatchCode={"$(=p(New_BatchCode))"}>}Revenue)

Regards

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 🙂