<?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 Define variables outside of Load statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550302#M205511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm looking for a way to define a variable in the script editor, outside of the load statement. To give some context info: in my current qv report, i load sales data from three different excel files; &lt;/P&gt;&lt;P&gt;for the field 'Date', i would like to define a variable called 'maxdate', calculating the most recent date of all my data, to immediately show the last day's numbers on my dashboard screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how would you do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;joris &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jul 2013 11:14:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-07-08T11:14:51Z</dc:date>
    <item>
      <title>Define variables outside of Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550302#M205511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm looking for a way to define a variable in the script editor, outside of the load statement. To give some context info: in my current qv report, i load sales data from three different excel files; &lt;/P&gt;&lt;P&gt;for the field 'Date', i would like to define a variable called 'maxdate', calculating the most recent date of all my data, to immediately show the last day's numbers on my dashboard screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how would you do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;joris &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 11:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550302#M205511</guid>
      <dc:creator />
      <dc:date>2013-07-08T11:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Define variables outside of Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550303#M205512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use max(datefield)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 11:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550303#M205512</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2013-07-08T11:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Define variables outside of Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550304#M205513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load Only date field from all ur excels and concate them, then take resident of that and calculate max(date) as Date and then use peek function to store that into a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transactions:&lt;BR /&gt;LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Date] as [Posting Date]&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;&lt;D&gt;&lt;BR /&gt;(qvd);&lt;/D&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE as [Posting Date]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;&lt;D&gt;&lt;BR /&gt;(qvd);&lt;/D&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;BR /&gt;Load&lt;BR /&gt;&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; min([Posting Date]) as minDate,&lt;BR /&gt;&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; max([Posting Date]) as maxDate&lt;BR /&gt;Resident Transactions;&lt;/P&gt;&lt;P&gt;Let varMinDate = Num(Peek('minDate', 0, 'Temp'));&lt;BR /&gt;Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 11:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550304#M205513</guid>
      <dc:creator>rajni_batra</dc:creator>
      <dc:date>2013-07-08T11:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Define variables outside of Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550305#M205514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the variable in Variable Overview&lt;/P&gt;&lt;P&gt;Define the variable as:&lt;/P&gt;&lt;P&gt;=max(YourDateField)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 11:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550305#M205514</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2013-07-08T11:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Define variables outside of Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550306#M205515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it works&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jul 2013 11:33:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Define-variables-outside-of-Load-statement/m-p/550306#M205515</guid>
      <dc:creator />
      <dc:date>2013-07-08T11:33:57Z</dc:date>
    </item>
  </channel>
</rss>

