<?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: Selecting data by date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346025#M492620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help Jose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now managed to sort this through another discussion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/240055#240055"&gt;http://community.qlik.com/message/240055#240055&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jul 2012 12:03:26 GMT</pubDate>
    <dc:creator>soton34</dc:creator>
    <dc:date>2012-07-20T12:03:26Z</dc:date>
    <item>
      <title>Selecting data by date</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346021#M492616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table of data showing where products are stored, the distance and the date it was there.&amp;nbsp; If the stock is moved then the new location is recorded and the date of the movement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me a table similar to the one below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Batch&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Location&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Distance&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;1&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;A035&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;9&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;01/07/11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;2&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;B055&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;7&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;01/07/11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;3&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;A099&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;8&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;01/07/11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;1&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;B056&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;7&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;01/09/11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;1&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;D034&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;15&lt;/TD&gt;&lt;TD style="TEXT-ALIGN: center;"&gt;01/02/12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I need to know, on any given date, where the stock was located (so that I can calculate the distance to the bin)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can I get a sale of batch 1 on 01/08/11 to return A035 and a sale of batch 1 on 01/01/12 to return B056?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently when I ask it for the Distance it either adds the 3 distances (9+7+15) or returns a Null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your assistance will be greatly appreciated as I am tasked to provide reports to measure and drive efficiency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I look forward to your replies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 15:39:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346021#M492616</guid>
      <dc:creator>soton34</dc:creator>
      <dc:date>2012-07-11T15:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data by date</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346022#M492617</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 think that you must create a Key field in your script with both fileds, Batch and Date so you will have a composite key and it will be unique for each combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Batch&amp;amp;'_'&amp;amp;Date as %Key&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM tableX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its always helpfull if you explain your script, your expressions in the charts or part of your model so we will be able to understand the problem much better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 16:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346022#M492617</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2012-07-11T16:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data by date</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346023#M492618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to keep it simple so didn't include all the extra info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's all linked tables from Invoice History through batch movement history and the location history table above and a separate location distance table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main thrust of the question was how, if I only have two dates (a start date and and end date), can I make a date in the middle pick the right location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not understand how creating a new field as a combination of batch and date will allow Qlikview to say where it was on a given date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it set analysis? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 16:13:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346023#M492618</guid>
      <dc:creator>soton34</dc:creator>
      <dc:date>2012-07-11T16:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data by date</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346024#M492619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry but I haven´t undertood your question very well.&lt;/P&gt;&lt;P&gt;If I understand the problem now, you need to know if a date is between a start and end date, don´t you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two ways to get that as I know, with set analysis or in load script with the function INTERVALMATCH() but I think that IntervalMatch didn´t work to this case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don´t know how your expression looks like but this is an example with pseudocode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date = {'&amp;gt;=$(=StartDate) &amp;lt;=$(=EndDate)'}&amp;gt;}Distance)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is like Date between StartDate and EndDate&lt;/P&gt;&lt;P&gt;Date = {'&amp;gt;=$(=StartDate) &amp;lt;=$(=EndDate)'}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2012 18:37:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346024#M492619</guid>
      <dc:creator>chematos</dc:creator>
      <dc:date>2012-07-11T18:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting data by date</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346025#M492620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help Jose&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now managed to sort this through another discussion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/240055#240055"&gt;http://community.qlik.com/message/240055#240055&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 12:03:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-data-by-date/m-p/346025#M492620</guid>
      <dc:creator>soton34</dc:creator>
      <dc:date>2012-07-20T12:03:26Z</dc:date>
    </item>
  </channel>
</rss>

