<?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 How to find the closest date? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228386#M80422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, the shipped date and invoiced date are on separate tables, not on the same row. sorry if it wasn't clear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Oct 2009 07:30:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-10-30T07:30:12Z</dc:date>
    <item>
      <title>How to find the closest date?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228384#M80420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need a function where I can find the most approximate date in the past to one supplied as a parameter. To be more clear, based on an invoiced date, I need to look up the order date with a set analysis function. Since the order date can be anywhere from 1 to 7 days in the past, (and obviously no order number linking both tables) I need to, based on the client number and date of a certain invoice, find the corresponding shipping date. I thought something like firstsortedvalue or max(&amp;lt;{OrderDate={"&amp;lt;$(=InvoiceDate)"}}&amp;gt; OrderDate) would work, but it's not happening. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2009 03:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228384#M80420</guid>
      <dc:creator />
      <dc:date>2009-10-30T03:24:37Z</dc:date>
    </item>
    <item>
      <title>How to find the closest date?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228385#M80421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, set analysis is in the context of the whole document, not just one row on the table, so that's probably why the expression isn't working. I'm guessing you could do the equivalent IF statement, and it might work since IF statements are in the context of the row:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;max(if(OrderDate&amp;lt;InvoiceDate,OrderDate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2009 06:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228385#M80421</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-30T06:13:32Z</dc:date>
    </item>
    <item>
      <title>How to find the closest date?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228386#M80422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, the shipped date and invoiced date are on separate tables, not on the same row. sorry if it wasn't clear.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2009 07:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228386#M80422</guid>
      <dc:creator />
      <dc:date>2009-10-30T07:30:12Z</dc:date>
    </item>
    <item>
      <title>How to find the closest date?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228387#M80423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't think that mattered if the tables are connected, and they should be by the client number. Maybe I'm missing something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2009 22:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228387#M80423</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-10-30T22:14:17Z</dc:date>
    </item>
    <item>
      <title>How to find the closest date?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228388#M80424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nevermind, I solved it with the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Sum({1&amp;lt;OrderDate={"$(=max({1&amp;lt;OrderDate={"&amp;lt;$(=date(InvoiceDate))"}&amp;gt;} OrderDate))"}&amp;gt;} Amount)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Oct 2009 00:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-the-closest-date/m-p/228388#M80424</guid>
      <dc:creator />
      <dc:date>2009-10-31T00:48:58Z</dc:date>
    </item>
  </channel>
</rss>

