Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
Valued Contributor III

Re: SET expression with variables

Try like:

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

MVP
MVP

Re: SET expression with variables

define

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

Now use as below

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

Highlighted
Not applicable

Re: SET expression with variables

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
Valued Contributor III

Re: SET expression with variables

Can you upload sample app?

Not applicable

Re: SET expression with variables

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.

karthigayan
Contributor II

Re: SET expression with variables

Hi try something like this:

In Expr:

Sum($(vCondition) Sales)

and in Variables

vCondition

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

upaliwije
Contributor II

Re: SET expression with variables

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


karthigayan
Contributor II

Re: SET expression with variables

I tried, this is working fine

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

Community Browser