<?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: Optimisation of date variable in script in QVW in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028327#M347348</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With autogenerate could be tables generic created - instead of the 1 could be also an expression which returned a numeric value and within the load could you with recno() react on the iteration - in short: it's a kind of a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case it creates a single field with only one value and against this value runs then the where-exists-clause. More stuff for optimizations could you find here: &lt;A href="https://community.qlik.com/docs/DOC-9038"&gt;Advanced topics for creating a qlik datamodel&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 May 2016 14:34:05 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-05-12T14:34:05Z</dc:date>
    <item>
      <title>Optimisation of date variable in script in QVW</title>
      <link>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028322#M347343</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;My first question is there a way of finding out how optimised your load is, as in find out which parts are taking the longest?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Secondly, when I am reloading my qvw it looks like it gets stuck on loading this variable &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;SystemDateKeyMonthRolling25&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the script I am using to generate this variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SystemDateKeyMonthRolling25:&lt;/P&gt;&lt;P&gt;LOAD DateKey AS [SystemDateKeyMonthRolling25]&lt;/P&gt;&lt;P&gt;FROM [..\QVD\DimDates.qvd] (qvd)&lt;/P&gt;&lt;P&gt;WHERE DateValue=date(AddMonths(Today(), -25));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vSystemDateKeyMonthRolling25=Peek('SystemDateKeyMonthRolling25', 0, SystemDateKeyMonthRolling25);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is there a more optimised way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2016 08:40:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028322#M347343</guid>
      <dc:creator />
      <dc:date>2016-04-27T08:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Optimisation of date variable in script in QVW</title>
      <link>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028323#M347344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are missing single quotes around your table name in the Peek function&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;LET vSystemDateKeyMonthRolling25=Peek('SystemDateKeyMonthRolling25', 0, &lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;'&lt;/SPAN&gt;SystemDateKeyMonthRolling25&lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;'&lt;/SPAN&gt;);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-8781"&gt;Missing Manual - Peek()&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 10:12:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028323#M347344</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-12T10:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Optimisation of date variable in script in QVW</title>
      <link>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028324#M347345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will this speed it up?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 10:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028324#M347345</guid>
      <dc:creator />
      <dc:date>2016-05-12T10:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Optimisation of date variable in script in QVW</title>
      <link>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028325#M347346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your qvd-load isn't optimized because you used a where-clause in the load-statement which isn't an exists(Field) statement which is the only where-clause exception for an optimized load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you could create one in this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp:&lt;/P&gt;&lt;P&gt;Load date(AddMonths(Today(), -25)) as DateValue autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SystemDateKeyMonthRolling25:&lt;/P&gt;&lt;P&gt;LOAD DateKey AS [SystemDateKeyMonthRolling25]&lt;/P&gt;&lt;P&gt;FROM [..\QVD\DimDates.qvd] (qvd)&lt;/P&gt;&lt;P&gt;WHERE exists(DateValue);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the variable-issue look at the suggestion from Sunny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 10:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028325#M347346</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-05-12T10:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Optimisation of date variable in script in QVW</title>
      <link>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028326#M347347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what does autogenerate 1 do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 10:30:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028326#M347347</guid>
      <dc:creator />
      <dc:date>2016-05-12T10:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Optimisation of date variable in script in QVW</title>
      <link>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028327#M347348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With autogenerate could be tables generic created - instead of the 1 could be also an expression which returned a numeric value and within the load could you with recno() react on the iteration - in short: it's a kind of a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case it creates a single field with only one value and against this value runs then the where-exists-clause. More stuff for optimizations could you find here: &lt;A href="https://community.qlik.com/docs/DOC-9038"&gt;Advanced topics for creating a qlik datamodel&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 14:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Optimisation-of-date-variable-in-script-in-QVW/m-p/1028327#M347348</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-05-12T14:34:05Z</dc:date>
    </item>
  </channel>
</rss>

