<?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: Get last date and previous one in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694589#M251151</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;Try this in script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;If(Previous(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;id_store) = id_store, Previous(date1)) AS date2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM DataSource&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;order by &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;id_store;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use date2 column in chart.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Sep 2014 11:01:20 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2014-09-25T11:01:20Z</dc:date>
    <item>
      <title>Get last date and previous one</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694586#M251148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having trouble trying to solve the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with clients id and two columns, the first with the selected date (selected on the filter) and the column should include the date just previous of the selected one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="315"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" width="74"&gt;id_store&lt;/TD&gt;&lt;TD class="xl64" width="111"&gt;date 1&lt;/TD&gt;&lt;TD class="xl64" width="130"&gt;date 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;11/07/2014&lt;/TD&gt;&lt;TD&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;11/08/2014&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;11/07/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;11/09/2014&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;11/08/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD colspan="3" height="20"&gt;If on my Qlik View I select the filter that contains the date, and I select 11/08/2014, what I want to obtain is the following:&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20"&gt;id_store&lt;/TD&gt;&lt;TD class="xl64"&gt;date 1&lt;/TD&gt;&lt;TD class="xl64"&gt;date 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;11/08/2014&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;11/07/2014&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Is this clear??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you can help me!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 10:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694586#M251148</guid>
      <dc:creator />
      <dc:date>2014-09-25T10:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get last date and previous one</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694587#M251149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why you want this to display, you might be better having the previous date as a variable based on the selection if you mean to do other calculations based on it, but if you use a chart straight table you can have the third column as an expression :&lt;/P&gt;&lt;P&gt;=[date1]-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 10:48:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694587#M251149</guid>
      <dc:creator>tcullinane</dc:creator>
      <dc:date>2014-09-25T10:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get last date and previous one</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694588#M251150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, I mean to do some calculus. In summary what I want is the following:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="558"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="186"&gt;store&lt;/TD&gt;&lt;TD class="xl65" width="186"&gt;products sold on date 1 &lt;/TD&gt;&lt;TD class="xl65" width="186"&gt;product sold on date 2 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Date 1 being the selcted one, and date two being the previous. &lt;/P&gt;&lt;P&gt;The catch on this is also that if I have more than two dates&amp;nbsp; and i SElect the last, and just the previous dint sold the product, I need to pick the&amp;nbsp; last date that this store sold the product without being the selected one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is confusing to explain, so please let me know if you understand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 10:56:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694588#M251150</guid>
      <dc:creator />
      <dc:date>2014-09-25T10:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get last date and previous one</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694589#M251151</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;Try this in script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;If(Previous(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;id_store) = id_store, Previous(date1)) AS date2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM DataSource&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;order by &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;id_store;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use date2 column in chart.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 11:01:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694589#M251151</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-09-25T11:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get last date and previous one</title>
      <link>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694590#M251152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will depend on how your data is loaded alright, If you are loading a table with [Store_ID,Sale_Date,Product,Amount,etc,...] an expression such as:&lt;/P&gt;&lt;P&gt;above(Sales_Date) with set analysis or if statement to limit the store and product should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 11:24:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-last-date-and-previous-one/m-p/694590#M251152</guid>
      <dc:creator>tcullinane</dc:creator>
      <dc:date>2014-09-25T11:24:23Z</dc:date>
    </item>
  </channel>
</rss>

