<?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 Re: Variable declaration in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-declaration/m-p/1002979#M340841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMP:&lt;/P&gt;&lt;P&gt;LOAD CONCAT(DISTINCT Category, ', ') as Tmp&lt;/P&gt;&lt;P&gt;RESIDENT YourTableWithCategory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vCat = Peek('Tmp',0,'TMP');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;TMP:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD CHR(39) &amp;amp; CONCAT(DISTINCT Category, CHR(39)&amp;amp; ', ' &amp;amp; CHR(39) ) &amp;amp; CHR(39) as Tmp&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;RESIDENT YourTableWithCategory;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LET vCat = Peek('Tmp',0,'TMP');&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;then&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;DROP TABLE TMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Nov 2015 17:51:59 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-11-01T17:51:59Z</dc:date>
    <item>
      <title>Variable declaration</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-declaration/m-p/1002978#M340840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one field which contains 100 unique value. I want to list down all fields value under one variable at script level. Below is the example;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Category&lt;/P&gt;&lt;P&gt;A,&lt;/P&gt;&lt;P&gt;B,&lt;/P&gt;&lt;P&gt;C,&lt;/P&gt;&lt;P&gt;D,&lt;/P&gt;&lt;P&gt;E,&lt;/P&gt;&lt;P&gt;F&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post achieving this, i will be using this variable in wildmatch or substringcount function at script level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Could you please help me to achieve this? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Imran K&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2015 09:00:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-declaration/m-p/1002978#M340840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-01T09:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Variable declaration</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-declaration/m-p/1002979#M340841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TMP:&lt;/P&gt;&lt;P&gt;LOAD CONCAT(DISTINCT Category, ', ') as Tmp&lt;/P&gt;&lt;P&gt;RESIDENT YourTableWithCategory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vCat = Peek('Tmp',0,'TMP');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;TMP:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LOAD CHR(39) &amp;amp; CONCAT(DISTINCT Category, CHR(39)&amp;amp; ', ' &amp;amp; CHR(39) ) &amp;amp; CHR(39) as Tmp&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;RESIDENT YourTableWithCategory;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;LET vCat = Peek('Tmp',0,'TMP');&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;then&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;DROP TABLE TMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2015 17:51:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-declaration/m-p/1002979#M340841</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-11-01T17:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Variable declaration</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-declaration/m-p/1002980#M340842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use concat for this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concat:&lt;/P&gt;&lt;P&gt;load concat(distinct Category, chr(39) &amp;amp; ',' &amp;amp; chr(39)) as CategoryList From xyz;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vCategoyList = peek('CategoryList', 0, 'concat');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then you could use '$(vCategoryList)' within your functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2015 17:53:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-declaration/m-p/1002980#M340842</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-11-01T17:53:04Z</dc:date>
    </item>
  </channel>
</rss>

