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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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