<?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 Autogenerate date from last date value until today in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217536#M70731</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;I'm looking for a solution to autogenerate dates (DATVVL) betwwen a last date value until today and copy last value (VALTIT) for a table of assets.&lt;/P&gt;&lt;P&gt;In the file joined, you will see 3 differents assets (NROTIT) with somes values, a creation date (CRETIT) and end date (DATTRM).&lt;/P&gt;&lt;P&gt;So for NROTIT 1 and 2, I would like to have the last value (1.29 ; 101.2) until today.&lt;/P&gt;&lt;P&gt;I had try with "autogenerate", and add load, but don't know how to write correctly the script.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Laurent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Apr 2011 07:49:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-15T07:49:45Z</dc:date>
    <item>
      <title>Autogenerate date from last date value until today</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217536#M70731</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;I'm looking for a solution to autogenerate dates (DATVVL) betwwen a last date value until today and copy last value (VALTIT) for a table of assets.&lt;/P&gt;&lt;P&gt;In the file joined, you will see 3 differents assets (NROTIT) with somes values, a creation date (CRETIT) and end date (DATTRM).&lt;/P&gt;&lt;P&gt;So for NROTIT 1 and 2, I would like to have the last value (1.29 ; 101.2) until today.&lt;/P&gt;&lt;P&gt;I had try with "autogenerate", and add load, but don't know how to write correctly the script.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Laurent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 07:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217536#M70731</guid>
      <dc:creator />
      <dc:date>2011-04-15T07:49:45Z</dc:date>
    </item>
    <item>
      <title>Autogenerate date from last date value until today</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217537#M70732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG&gt;ljonette&lt;/STRONG&gt; ,&lt;/P&gt;&lt;P&gt;Use the below code, which automatically generates dates in to the &lt;STRONG&gt;CalendarDate&lt;/STRONG&gt; field. Set your Min and max date fields to the vDateMin and vDateMax Variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;LET vDateMin = num(addmonths(date(ToDay()),-27)); &lt;STRONG&gt;// asign your starting date field value here&lt;BR /&gt;&lt;/STRONG&gt;LET vDateMax = Floor(MonthEnd(Today())); &lt;STRONG&gt;// asign your ending date field value here&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;TempCalendar:&lt;BR /&gt;LOAD&lt;BR /&gt;$(vDateMin) + RowNo() - 1 AS DateNumber,&lt;BR /&gt;Date($(vDateMin) + RowNo() - 1) AS TempDate&lt;BR /&gt;AUTOGENERATE 1&lt;BR /&gt;WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax);&lt;/P&gt;&lt;P&gt;MasterCalendar1:&lt;BR /&gt;LOAD&lt;BR /&gt;TempDate AS &lt;STRONG&gt;CalendarDate&lt;BR /&gt;&lt;/STRONG&gt;RESIDENT TempCalendar ORDER BY TempDate ASC;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 08:39:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217537#M70732</guid>
      <dc:creator />
      <dc:date>2011-04-15T08:39:52Z</dc:date>
    </item>
    <item>
      <title>Autogenerate date from last date value until today</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217538#M70733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Arun for your suggestion,&lt;/P&gt;&lt;P&gt;I've made something you can see on the file joined that it works and I've the result I want.&lt;/P&gt;&lt;P&gt;Just want to know if there is an easier way to do it. Because with a dtb of more than 2000 NROTIT and history of NAV from year 1998, it takes a long (very long time) to load data.&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;Laurent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2011 07:24:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217538#M70733</guid>
      <dc:creator />
      <dc:date>2011-04-22T07:24:03Z</dc:date>
    </item>
    <item>
      <title>Autogenerate date from last date value until today</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217539#M70734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Laurent&lt;/P&gt;&lt;P&gt;If the answer helped you, please, don't forget to mark it as a valid answer so other people can rely on it and others don't come here to try to answer again&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2011 07:33:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217539#M70734</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-04-22T07:33:01Z</dc:date>
    </item>
    <item>
      <title>Autogenerate date from last date value until today</title>
      <link>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217540#M70735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;It was a good suggestion.&lt;/P&gt;&lt;P&gt;But my question now is: How to make the script easier and more powerfull?&lt;/P&gt;&lt;P&gt;Because with a database with more than 2 million lines for arround 2000 assets (NROTIT), it takes more than 6h.&lt;/P&gt;&lt;P&gt;With my second file attached before, I make this:&lt;/P&gt;&lt;P&gt;&amp;lt;code&lt;/P&gt;&lt;P&gt;NROTIT:&lt;BR /&gt;Load distinct NROTIT&lt;BR /&gt;Resident VL;&lt;BR /&gt;&lt;BR /&gt;LET iNroT = NoOfRows('NROTIT');&lt;BR /&gt;&lt;BR /&gt; For i = 0 To iNroT-1&lt;BR /&gt; LET sNroT = PEEK('NROTIT', i, 'NROTIT');&lt;/P&gt;&lt;P&gt;code&amp;gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2011 10:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Autogenerate-date-from-last-date-value-until-today/m-p/217540#M70735</guid>
      <dc:creator />
      <dc:date>2011-04-22T10:16:35Z</dc:date>
    </item>
  </channel>
</rss>

