<?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: Create variables with a loop from Excel in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356442#M493000</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;this script will help you...&lt;/P&gt;&lt;P&gt;LET&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vKPI&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoOfRows&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('KPI');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;For&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vKPI)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;Variable&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FieldValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('KPICode',&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(Variable)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FieldValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('KPI_Expression',&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;NEXT&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; niranjan M&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2012 08:46:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-06-18T08:46:21Z</dc:date>
    <item>
      <title>Create variables with a loop from Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356440#M492998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have an Excel with a seperate tab for all the KPI's with the expressions we use in the QV dashboard.&lt;BR /&gt;I'm trying to create a loop so all variables will be automaticly be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to do something like this:&lt;/P&gt;&lt;P&gt;KPI:&lt;BR /&gt;LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KPICode, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KPI&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS KPI_Desc, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expression&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS KPI_Expression&lt;BR /&gt;FROM&lt;BR /&gt;[..\Nav_Aansturing\Qlikview control file.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [KPI's])&lt;BR /&gt;Where not IsNull(KPI);&lt;/P&gt;&lt;P&gt;LET vKPI = NoOfRows('KPI');&lt;/P&gt;&lt;P&gt;For i = 1 to $(vKPI)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET $(i)_vKPICode = FieldValue('KPI_Expression',$(i));&lt;/P&gt;&lt;P&gt;NEXT i;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that I can not make it work that the variable name is created with a variabele name.&lt;BR /&gt;I Have added the Excel file with variabele I want to create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 08:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356440#M492998</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2012-06-18T08:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create variables with a loop from Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356441#M492999</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;You can use the following approach&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR var_i = 1 TO NOOFROWS('KPI')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l_var = PEEK('KPICode, var_i - 1, 'KPI');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l_val = PEEK('KPI_Expression', var_i&amp;nbsp; - 1, 'KPI');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET $(l_var) = $(l_val);&lt;/P&gt;&lt;P&gt;NEXT var_i;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Darius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 08:30:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356441#M492999</guid>
      <dc:creator>d_pranskus</dc:creator>
      <dc:date>2012-06-18T08:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create variables with a loop from Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356442#M493000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;this script will help you...&lt;/P&gt;&lt;P&gt;LET&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vKPI&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoOfRows&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('KPI');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;For&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vKPI)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;Variable&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FieldValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('KPICode',&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(Variable)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FieldValue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('KPI_Expression',&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;NEXT&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; niranjan M&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 08:46:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356442#M493000</guid>
      <dc:creator />
      <dc:date>2012-06-18T08:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create variables with a loop from Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356443#M493001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darius,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works the way I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 08:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356443#M493001</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2012-06-18T08:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create variables with a loop from Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356444#M493002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Niranjan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your approach also works.&lt;/P&gt;&lt;P&gt;Thanks for your help as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 08:50:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-variables-with-a-loop-from-Excel/m-p/356444#M493002</guid>
      <dc:creator>jjordaan</dc:creator>
      <dc:date>2012-06-18T08:50:25Z</dc:date>
    </item>
  </channel>
</rss>

