<?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: Last month and date missing in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207925#M625724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Marco, &lt;/P&gt;&lt;P&gt;maybe you could try with first n load (because you don't know how many dates are missing... one? two? Ten?).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;If DataTable is the name of the table loaded, you could do something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vToday = Date('11/10/2016', 'DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MyTable:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, MyValue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 07/09/2016, 33&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 08/09/2016, 11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09/09/2016, 23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/09/2016, 44&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13/09/2016, 32&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14/09/2016, 43&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09/10/2016, 77&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/10/2016, 65&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11/10/2016, 45&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AMonthAgo:&lt;/P&gt;&lt;P&gt;FIRST 10 LOAD Date, //if you need you can increase the number of record (for example if you have many days of jump)&lt;/P&gt;&lt;P&gt;&amp;nbsp; MyValue&lt;/P&gt;&lt;P&gt;Resident MyTable&lt;/P&gt;&lt;P&gt;Where Date &amp;lt;= AddMonths($(vToday), -1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Max(Date) as Date&lt;/P&gt;&lt;P&gt;Resident AMonthAgo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table MyTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if what you are looking for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Nov 2016 08:05:41 GMT</pubDate>
    <dc:creator>simospa</dc:creator>
    <dc:date>2016-11-04T08:05:41Z</dc:date>
    <item>
      <title>Last month and date missing</title>
      <link>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207923#M625722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a table with date and values. In loading script I need to take the value referred to the date 1 month before... this could be simple with AddMonths function (and I'm able to to this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ) but what if the date is missing and I need to recover the previous populated date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="266"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="138"&gt;Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="128"&gt;MyValue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;07/09/2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;33&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;08/09/2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;09/09/2016&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;12/09/2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;44&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;13/09/2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;14/09/2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;43&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;09/10/2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;77&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;10/10/2016&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;65&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="20" style="border-top: none;"&gt;11/10/2016&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;45&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with vTodayDate = 11/10/2016, 1 month before is AddMonths(vTodayDate, -1) --&amp;gt; 11/09/2016... but I haven't it. I need to consider 09/09/2016 because is the previous useful date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 17:16:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207923#M625722</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2016-11-03T17:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Last month and date missing</title>
      <link>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207924#M625723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe first loading&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&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;AddMonths(vTodayDate, -1)&amp;nbsp; as PreviousMonthDate&lt;/SPAN&gt;&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;and in a second resident load join the Maximum Date &amp;lt;= PreviousMonthDate.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 00:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207924#M625723</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-11-04T00:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Last month and date missing</title>
      <link>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207925#M625724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Marco, &lt;/P&gt;&lt;P&gt;maybe you could try with first n load (because you don't know how many dates are missing... one? two? Ten?).&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;If DataTable is the name of the table loaded, you could do something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vToday = Date('11/10/2016', 'DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MyTable:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, MyValue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 07/09/2016, 33&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 08/09/2016, 11&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09/09/2016, 23&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12/09/2016, 44&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13/09/2016, 32&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14/09/2016, 43&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 09/10/2016, 77&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/10/2016, 65&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11/10/2016, 45&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AMonthAgo:&lt;/P&gt;&lt;P&gt;FIRST 10 LOAD Date, //if you need you can increase the number of record (for example if you have many days of jump)&lt;/P&gt;&lt;P&gt;&amp;nbsp; MyValue&lt;/P&gt;&lt;P&gt;Resident MyTable&lt;/P&gt;&lt;P&gt;Where Date &amp;lt;= AddMonths($(vToday), -1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inner Join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD Max(Date) as Date&lt;/P&gt;&lt;P&gt;Resident AMonthAgo;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table MyTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if what you are looking for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;S.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 08:05:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207925#M625724</guid>
      <dc:creator>simospa</dc:creator>
      <dc:date>2016-11-04T08:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Last month and date missing</title>
      <link>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207926#M625725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Simone,&lt;/P&gt;&lt;P&gt;it was exactly what I wanted!&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 08:27:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-month-and-date-missing/m-p/1207926#M625725</guid>
      <dc:creator>mike_spada</dc:creator>
      <dc:date>2016-11-04T08:27:13Z</dc:date>
    </item>
  </channel>
</rss>

