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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Declaring sets once and reusing

Hi everyone

In the main script for my project I am calculating some global parameters and storing the values in variables. As an example I have created a short sample below:

SET varH8 = sum({1<Subject={'H8 Chemical Engineering'}, Gender=,

     Industry={

          'Engineering',

          'Science',

          'Maths'}

     >}Data);

This is working fine, but as my data set builds I am finding that the list of 'Industry' is growing maybe to 20 different items, and I am reusing that list is multiple places

Is it possible to define a list somehow which can be pulled in, for example

#define IndustryList = 'Engineering', 'Science', 'Maths'

SET varH8 = sum({1<Subject={'H8 Chemical Engineering'}, Gender=, Industry=IndustryList>}Data);

Thanks


0 Replies