Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis

Hi,

I want to use a part of set analysis to be stored in variable. Any suggestions?

I have data like,

Description   Amt

A                   100

B                   200

C                   300

D                    400

Set analysis is like =sum({<Description = {'A'}> }Amt). But I want to store Description = {'A'} in a variable and use that in a expression.


Labels (1)
6 Replies
Digvijay_Singh
MVP
MVP

May be like this -

Capture.PNG

Capture1.PNG

Anonymous
Not applicable
Author

Thanks its working.

May I know why we get red line?

Digvijay_Singh
MVP
MVP

You may ignore that, its showing because editor assumes set expression is not properly written.

vishalarote
Partner - Creator II
Partner - Creator II

May be Try this Manner

make Variable vDescA

Description='A'

n write Set Analysis like

sum({<Description={"=$(vDescA)"}>}Amt)

Capture9.PNGCapture7.PNG

Anonymous
Not applicable
Author

if I want to add A Or B or C, then expression isn't working

vishalarote
Partner - Creator II
Partner - Creator II

then u used in vDesc

wildmatch(Description,'A','B','C')

and Write expression in text object

sum({<Description={"=$(vDesc)"}>}Amt)