<?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: Calculate To Date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-To-Date/m-p/1014778#M637506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Product, From Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, 01/01/2013&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, 23/04/2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, 08/07/2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, 13/01/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, 09/02/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, 01/03/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Product = Peek('Product'), Date(Peek('From Date') - 1), Date(Today())) as [To Date]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Product, [From Date] desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118399_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Mar 2016 12:49:10 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-03-17T12:49:10Z</dc:date>
    <item>
      <title>Calculate To Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-To-Date/m-p/1014777#M637505</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;I Have a Table contains 2 columns, &lt;BR /&gt;I want to add to this table 'To Date' column contains next&amp;nbsp; row 'From Date' minus a day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone have an efficient way to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Jacob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original Table&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 170px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="font-size: 8pt; color: white; font-weight: bold; font-family: Tahoma; border: 0.5pt solid windowtext; background: #4f81bd;" width="106"&gt;Product&lt;/TD&gt;&lt;TD class="xl64" style="font-size: 8pt; color: white; font-weight: bold; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; background: #4f81bd;" width="64"&gt;From Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;01/01/2013&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;23/04/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl66" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;08/07/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;13/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl66" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;09/02/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl67" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;01/03/2016&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output Table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="302"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="font-size: 8pt; color: white; font-weight: bold; font-family: Tahoma; border: 0.5pt solid windowtext; background: #4f81bd;" width="106"&gt;Product&lt;/TD&gt;&lt;TD class="xl66" style="font-size: 8pt; color: white; font-weight: bold; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; background: #4f81bd;" width="64"&gt;Date&lt;/TD&gt;&lt;TD class="xl72" style="font-size: 8pt; color: white; font-weight: bold; font-family: Tahoma; border: 0.5pt solid windowtext; background: #76933c;" width="132"&gt;To Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;01/01/2013&lt;/TD&gt;&lt;TD align="right" class="xl73" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; background: #ebf1de;"&gt;22/04/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;23/04/2014&lt;/TD&gt;&lt;TD align="right" class="xl73" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; background: #ebf1de;"&gt;07/07/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;08/07/2014&lt;/TD&gt;&lt;TD class="xl73" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; background: #ebf1de;"&gt;17/03/2016 (Today Date)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;13/01/2016&lt;/TD&gt;&lt;TD align="right" class="xl73" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; background: #ebf1de;"&gt;08/02/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl68" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;09/02/2016&lt;/TD&gt;&lt;TD align="right" class="xl73" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; background: #ebf1de;"&gt;29/03/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl71" height="20" style="font-size: 8pt; color: #333333; font-family: Tahoma; border: 0.5pt solid windowtext;"&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl69" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext;"&gt;01/03/2016&lt;/TD&gt;&lt;TD class="xl73" style="font-size: 8pt; color: #333333; font-family: Tahoma; border-top-width: 0.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-width: 0.5pt; border-right-color: windowtext; border-bottom-width: 0.5pt; border-bottom-color: windowtext; background: #ebf1de;"&gt;17/03/2016 (Today Date)&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 12:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-To-Date/m-p/1014777#M637505</guid>
      <dc:creator />
      <dc:date>2016-03-17T12:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate To Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-To-Date/m-p/1014778#M637506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Product, From Date&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, 01/01/2013&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, 23/04/2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, 08/07/2014&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, 13/01/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, 09/02/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, 01/03/2016&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Product = Peek('Product'), Date(Peek('From Date') - 1), Date(Today())) as [To Date]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By Product, [From Date] desc;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118399_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 12:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-To-Date/m-p/1014778#M637506</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-17T12:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate To Date</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-To-Date/m-p/1014779#M637507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD Product, Date FROM ...source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If( Product =Previous(Product),Previous(Date)&lt;SPAN style="font-size: 13.3333px;"&gt;, Date(Today(),'DD/MM/YYYY')&lt;/SPAN&gt;) as [To Date]&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Temp&lt;/P&gt;&lt;P&gt;Order By Product, Date desc;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 12:49:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-To-Date/m-p/1014779#M637507</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-17T12:49:34Z</dc:date>
    </item>
  </channel>
</rss>

