Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SET expression with variables

Hi all.

I need to use set expression with value variable.

I don't know how i can write this formula

For example i have variable vSALES

it is SALES with documents 1, 2, 3

  sum(<documents = {1,2,3}>}Sales

- sum(<documents = {4}>}Sales

This vSALES

I want to use this vSALES for anather SET

for example

sum(<year = {2014}>}vSALES ???? How to write expression


8 Replies
senpradip007
Specialist III
Specialist III

Try like:

Sum({<year={2014}, document={1,2,3}>} Sales)

MK_QSL
MVP
MVP

define

vSALES = documents = {1,2,3}-{4]

Now use as below

SUM({<vSALES, year = {2014}>}Sales)

Not applicable
Author

OK its good, but i want with variables becouse my formula for sales have o lot of many part and add 2 set in another for this parts it is not good idea

senpradip007
Specialist III
Specialist III

Can you upload sample app?

Not applicable
Author

Sorry but real file not, but you can created any file for this situation examples, just i want how use variables in finish set expression.

Anonymous
Not applicable
Author

Hi try something like this:

In Expr:

Sum($(vCondition) Sales)

and in Variables

vCondition

{<year={2014}, document={1,2,3}>}

upaliwije
Creator II
Creator II

sum(<year = {2014}>}$(=vSALES)) How to write expression


Anonymous
Not applicable
Author

I tried, this is working fine

=sum(<year = {2014}>}vSALES)