<?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: help with interval match or may be scripting with dates in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/help-with-interval-match-or-may-be-scripting-with-dates/m-p/806072#M665811</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot massimo ... you helped me a lot man... and i have posted another question in community. do you mind helping me on that &lt;A _jive_internal="true" href="https://community.qlik.com/message/695640#695640" title="http://community.qlik.com/message/695640#695640"&gt;http://community.qlik.com/message/695640#695640&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2015 21:15:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-01-16T21:15:15Z</dc:date>
    <item>
      <title>help with interval match or may be scripting with dates</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-interval-match-or-may-be-scripting-with-dates/m-p/806070#M665809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Please see attached QVW file. in my table the key columns are combination of Itemkey and Key. And for each row of Item key &amp;amp; key i will have sales price which are active with in the date ranges (fromdate and ToDate). So my problem is whenever they change the price in the database the fromdate is changing but the todate remains the same. for example please see below: for the 3|1495.562.M the Sales price has been changed 3 times. But the Todate has changed only 2 times .&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/75554_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help in creating a column which gives me the correct date range when the Todate is not changed then assign correct Todate. The expected result is below highlighted in green.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 536pt;" width="711"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; width: 25pt;" width="33"&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/75556_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 69pt;" width="92"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 52pt;" width="69"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 47pt;" width="62"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 47pt;" width="62"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 41pt;" width="54"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 36pt;" width="48"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 38pt;" width="51"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 53pt;" width="70"&gt;&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; width: 32pt;" width="42"&gt;&lt;/TD&gt;&lt;TD style="width: 48pt;" width="64"&gt;&lt;/TD&gt;&lt;TD class="xl68" style="width: 48pt;" width="64"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 20:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-interval-match-or-may-be-scripting-with-dates/m-p/806070#M665809</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-16T20:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: help with interval match or may be scripting with dates</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-interval-match-or-may-be-scripting-with-dates/m-p/806071#M665810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if I understand, add after your script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Newtest:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp; *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(ItemKey&amp;lt;&amp;gt;Peek(ItemKey) or Key&amp;lt;&amp;gt;Peek(Key), todate, date(peek(fromdate)-1)) as new_todate&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&amp;nbsp; Test&lt;/P&gt;&lt;P&gt;order by ItemKey, Key, fromdate desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/75550_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 21:03:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-interval-match-or-may-be-scripting-with-dates/m-p/806071#M665810</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-01-16T21:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: help with interval match or may be scripting with dates</title>
      <link>https://community.qlik.com/t5/QlikView/help-with-interval-match-or-may-be-scripting-with-dates/m-p/806072#M665811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks a lot massimo ... you helped me a lot man... and i have posted another question in community. do you mind helping me on that &lt;A _jive_internal="true" href="https://community.qlik.com/message/695640#695640" title="http://community.qlik.com/message/695640#695640"&gt;http://community.qlik.com/message/695640#695640&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 21:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/help-with-interval-match-or-may-be-scripting-with-dates/m-p/806072#M665811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-01-16T21:15:15Z</dc:date>
    </item>
  </channel>
</rss>

