Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis for variable

So in script editor I define my variables as

set QuantitySold = Sum({<product={'shirts','pants'}, [SERIE]={'Actuals}>}  QTY);

and after reload I want to apply set analysis for years like Sum({<Year={'2016'}>}  $(QuantitySold) )

Can I do this?

1 Reply
marcus_sommer

In this case you would nest aggregations without to implement an aggr-function and this is not a valid syntax. Maybe you changed it to:

set QuantitySold = Sum({<product={'shirts','pants'}, [SERIE]={'Actuals}, Year ={$1}>}  QTY);

and then you call your expression with:

$(QuantitySold(2016))

- Marcus