<?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 sales date before certain date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-sales-date-before-certain-date/m-p/785446#M1035115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;FirstSortedValue&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"&amp;lt;$(=Date(Min(Date)))"&lt;/SPAN&gt;}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;, -&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replacing Sales for whatever field holds your sales values - this will give you the latest sale with a date less than the selected date, bear in mind that without a selection this Date field will find the minimum date possible, and so would return a null value as there's no date less than the minimum of your dataset - you could make your set more complex to allow for this if need be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jan 2015 08:47:30 GMT</pubDate>
    <dc:creator>morganaaron</dc:creator>
    <dc:date>2015-01-14T08:47:30Z</dc:date>
    <item>
      <title>Last sales date before certain date</title>
      <link>https://community.qlik.com/t5/QlikView/Last-sales-date-before-certain-date/m-p/785445#M1035114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;Dear community,&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: 13.3333330154419px;"&gt;&lt;BR /&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: 13.3333330154419px;"&gt;I got many difficulties with the set analysis, is there anyone can help me with following scenario?&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: 13.3333330154419px;"&gt;&lt;BR /&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: 13.3333330154419px;"&gt;I am trying to find out the most recent sales date before the date whichever user is selected,&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: 13.3333330154419px;"&gt;&lt;BR /&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: 13.3333330154419px;"&gt;The script I have created, but it doesn't work...&lt;BR /&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: 13.3333330154419px;"&gt;&lt;BR /&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: 13.3333330154419px;"&gt;vMinDate = min(Date)&lt;BR /&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: 13.3333330154419px;"&gt;&lt;BR /&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: 13.3333330154419px;"&gt;if(SDate &amp;lt;= vMinDate, max(month(FS_SDate))) &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jan 2015 22:32:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-sales-date-before-certain-date/m-p/785445#M1035114</guid>
      <dc:creator />
      <dc:date>2015-01-13T22:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Last sales date before certain date</title>
      <link>https://community.qlik.com/t5/QlikView/Last-sales-date-before-certain-date/m-p/785446#M1035115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;FirstSortedValue&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;={&lt;SPAN style="color: #800000;"&gt;"&amp;lt;$(=Date(Min(Date)))"&lt;/SPAN&gt;}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;, -&lt;SPAN style="color: #800000;"&gt;Date&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replacing Sales for whatever field holds your sales values - this will give you the latest sale with a date less than the selected date, bear in mind that without a selection this Date field will find the minimum date possible, and so would return a null value as there's no date less than the minimum of your dataset - you could make your set more complex to allow for this if need be.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 08:47:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-sales-date-before-certain-date/m-p/785446#M1035115</guid>
      <dc:creator>morganaaron</dc:creator>
      <dc:date>2015-01-14T08:47:30Z</dc:date>
    </item>
  </channel>
</rss>

