<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Declaring sets once and reusing in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Declaring-sets-once-and-reusing/m-p/668461#M1078209</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET varH8 = sum({1&amp;lt;Subject={'H8 Chemical Engineering'}, Gender=,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Industry={&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Engineering',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Science',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Maths'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;}Data);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to define a list somehow which can be pulled in, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define IndustryList = 'Engineering', 'Science', 'Maths'&lt;/P&gt;&lt;P&gt;SET varH8 = sum({1&amp;lt;Subject={'H8 Chemical Engineering'}, Gender=, Industry=IndustryList&amp;gt;}Data);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jul 2014 09:17:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-07-14T09:17:38Z</dc:date>
    <item>
      <title>Declaring sets once and reusing</title>
      <link>https://community.qlik.com/t5/QlikView/Declaring-sets-once-and-reusing/m-p/668461#M1078209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET varH8 = sum({1&amp;lt;Subject={'H8 Chemical Engineering'}, Gender=,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Industry={&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Engineering',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Science',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Maths'}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;}Data);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to define a list somehow which can be pulled in, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define IndustryList = 'Engineering', 'Science', 'Maths'&lt;/P&gt;&lt;P&gt;SET varH8 = sum({1&amp;lt;Subject={'H8 Chemical Engineering'}, Gender=, Industry=IndustryList&amp;gt;}Data);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jul 2014 09:17:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Declaring-sets-once-and-reusing/m-p/668461#M1078209</guid>
      <dc:creator />
      <dc:date>2014-07-14T09:17:38Z</dc:date>
    </item>
  </channel>
</rss>

