<?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: How to create a variable list from a table field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565553#M211040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's it, now it works :-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support and patience :-).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jan 2014 08:30:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-27T08:30:32Z</dc:date>
    <item>
      <title>How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565539#M211026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to build a match-clause for a load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The current values are stored in a table called LatestProfileAssessments, field name is Assessment_Period_Sort.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i fill a variable vLatestPeriods to look like '201402','201401','201312','201311'&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 12:31:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565539#M211026</guid>
      <dc:creator />
      <dc:date>2014-01-24T12:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565540#M211027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a variable using below expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Concat(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Assessment_Period_Sort&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 12:47:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565540#M211027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T12:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565541#M211028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(Fieldname&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39) &amp;amp; ',' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39) ) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(39) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;the concat is here with the separator option in order to create the ',' separator.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;chr(39) is in front, and at the end to add a new quote&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Fabrice&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 12:54:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565541#M211028</guid>
      <dc:creator />
      <dc:date>2014-01-24T12:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565542#M211029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not load all Assessment_Period_Sort values in a mapping table, and use applymap() to match values? Very fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2014 13:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565542#M211029</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-01-24T13:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565543#M211030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently I cannot follow any of the solutions, as what I read from the table field is null, although the field is filled. Strange. I tried to use Peek and concatenate commands, both ended up in an empty variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps I'm following a wrong approach in general, I try to load only the records from the 5 latest time periods. For that I create a sorted table that then contains these records, and then create a variable from it, but perhaps there is an easier solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jan 2014 21:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565543#M211030</guid>
      <dc:creator />
      <dc:date>2014-01-25T21:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565544#M211031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Load your time periods into a temp table&lt;/P&gt;&lt;P&gt;2) Sort your temp table (load into temp table 2 resident First Table order by date periods)&lt;/P&gt;&lt;P&gt;3) Usee peek, sth like&lt;/P&gt;&lt;P&gt;Mavar= peek(field of date, NoOfRows('Temp Table 2')-5, 'Temp Table2')&lt;/P&gt;&lt;P&gt;4) Load you file WHERE Date period &amp;gt;= $(MaVar)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Jan 2014 12:50:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565544#M211031</guid>
      <dc:creator />
      <dc:date>2014-01-26T12:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565545#M211032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fabrice,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I follow your suggestion, but I have the same issue as before. The variable doesn´t seem to work, as it is not added to the Variable overview and step 4 fails because of this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort_Tmp:&lt;/P&gt;&lt;P&gt;LOAD Distinct date#("Assessment_Period", 'YYYYMM') as "Assessment_Period_Date"&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT "Assessment_Period"&lt;/P&gt;&lt;P&gt;FROM "Rep_Webdata_Prod".dbo.tblProfileAssessment&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LatestProfileAssessments:&lt;/P&gt;&lt;P&gt;LOAD "Assessment_Period_Date",&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Assessment_Period_Date" as "Assessment_Period_Date_Sorted"&lt;/P&gt;&lt;P&gt;resident Sort_Tmp order by Assessment_Period_Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vLimit= peek(Assessment_Period_Date_Sort, NoOfRows('LatestProfileAssessments')-5, 'LatestProfileAssessments');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 07:31:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565545#M211032</guid>
      <dc:creator />
      <dc:date>2014-01-27T07:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565546#M211033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a variable and assign an expression as =Concat(GetFieldSelections(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Assessment_Period_Sort&lt;/SPAN&gt;, ','))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Vardhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565546#M211033</guid>
      <dc:creator />
      <dc:date>2014-01-27T08:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565547#M211034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this?&lt;/P&gt;&lt;P&gt;let vLimit = Concat(GetFieldSelections(Assessment_Period_Sort, ','));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Leads to a script error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:06:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565547#M211034</guid>
      <dc:creator />
      <dc:date>2014-01-27T08:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565548#M211035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It shoudl work.&lt;/P&gt;&lt;P&gt;Check your first table Sort_Temp. is it empty ? or sth in it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Replace the double quoutes - the " - by single quoutes - '- or brackets - [] - around the field names.&lt;/P&gt;&lt;P&gt;- check your field in the SQl database. Is the format correct ? Can QV interprets that field as a correct date ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:06:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565548#M211035</guid>
      <dc:creator />
      <dc:date>2014-01-27T08:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565549#M211036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- The table Sort_Tmp contains 180 rows.&lt;/P&gt;&lt;P&gt;- Done - not working, as the variable is still&amp;nbsp; not created&lt;/P&gt;&lt;P&gt;- The field in the DB is of type String. That's why I try to convert to date during load - maybe there is an error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565549#M211036</guid>
      <dc:creator />
      <dc:date>2014-01-27T08:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565550#M211037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Set instead of Let ..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:22:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565550#M211037</guid>
      <dc:creator />
      <dc:date>2014-01-27T08:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565551#M211038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;OK. Data is retrieved from SQL database. But the dark hole comes after.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peek syntax is: peek('field name with quote', number, 'table with quoute')&lt;/P&gt;&lt;P&gt;I think you forgot one quote in the first argument.&lt;/P&gt;&lt;P&gt;Mayi ask yoy to check ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:24:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565551#M211038</guid>
      <dc:creator />
      <dc:date>2014-01-27T08:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565552#M211039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This won't work as it then doesn't calculate the right side, but instead writes the string as variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:29:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565552#M211039</guid>
      <dc:creator />
      <dc:date>2014-01-27T08:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a variable list from a table field</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565553#M211040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's it, now it works :-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support and patience :-).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 08:30:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-variable-list-from-a-table-field/m-p/565553#M211040</guid>
      <dc:creator />
      <dc:date>2014-01-27T08:30:32Z</dc:date>
    </item>
  </channel>
</rss>

