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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
dafnis14
Specialist
Specialist

String variable in Set Analysis

Hi All,

I can't figure out why the following  Set Analysis example doesn't work:

Temp:
LOAD * INLINE [
Code, Status, Amount
9,A,100
3,B,200
6,A, 500
1,A,100
2,B,200
4,A, 500
]
;

I have defined a variable vStatus that can be either A or B:

IF(DAY(Today()) >15,'A', 'B')

The following expression doesn't work. The result is 0.

(I have tried all kinds of variations Of writing the variable).

sum({<Status = {'$vStatus'} >} Amount)

Your kind help is highly appreciated.

Thanks!

Message was edited by: Dafnis X Attached is my file. Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Use an equal sign first in your variable definition

View solution in original post

8 Replies
rogerioqv
Creator II
Creator II

Dafinis,

Following example

swuehl
MVP
MVP

Try either

Status = {'$(vStatus)'}

or

Status = {'$(=vStatus)'}

Not applicable

Hey see the attached file.

maxgro
MVP
MVP

sum({<Status={$(vStatus)} >} Amount)

dafnis14
Specialist
Specialist
Author

Hi,

You can see that the various options aren't working..

I can't open the files sent by you kind people until tomorrow ...

Thanks!

Set Analysis issue.PNG.png

swuehl
MVP
MVP

Use an equal sign first in your variable definition

dafnis14
Specialist
Specialist
Author

Thanks!

Anonymous
Not applicable

See attached