<?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 getting the right values for the right code and time period in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278469#M712200</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its something like this, i select a Requestts and it needs to link with a date in startTS but as you can see for that time there isn't one so it should link to the value smaller and closest to the requestTS in this case: 01/01/2007. Just to make sure it's not always the first of the month for startTS it's just a coincidence.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="compare.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/4020_compare.PNG" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2011 08:25:49 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-06T08:25:49Z</dc:date>
    <item>
      <title>getting the right values for the right code and time period</title>
      <link>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278468#M712198</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'm having some troubles linking 2 tables. This is the situation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;- PrestationCode&lt;BR /&gt;- RequestTS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;- PrestationCode&lt;/P&gt;&lt;P&gt;- startTS&lt;/P&gt;&lt;P&gt;- endTS&lt;/P&gt;&lt;P&gt;- Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each PrestationCode can be used multiple times and has values for a certain time period (startTS - endTS). I first just created a concatenated link PrestationCode&amp;amp;'-'&amp;amp;&lt;SPAN style="font-weight: bold;"&gt;monthstart(&lt;/SPAN&gt;RequestTS) with PrestationCode&amp;amp;'-'&amp;amp;startTS. It worked in must cases cause startTS was in most cases the first of the month but sometimes it's not the first and i can't just set startTS to the first of the month cause then i'll get wrong values.&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code: 5000 startTS: 1/07/2007 endTS: 31/12/2007 values: 10, 20&lt;BR /&gt;code: 5000 startTS: 11/07/2007 endTS: 30/06/2008 values: 5&lt;/P&gt;&lt;P&gt;code: 1000 startTS: 1/01/2007&amp;nbsp; endTS: 31/12/2009 values: 15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if i select a code and startTS than i'll get a unique endTS so i don't think i need an intervalmatch... I just need to see if there is more then one startTS in that month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you guys understand my situation and can help me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 07:14:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278468#M712198</guid>
      <dc:creator />
      <dc:date>2011-05-06T07:14:57Z</dc:date>
    </item>
    <item>
      <title>getting the right values for the right code and time period</title>
      <link>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278469#M712200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its something like this, i select a Requestts and it needs to link with a date in startTS but as you can see for that time there isn't one so it should link to the value smaller and closest to the requestTS in this case: 01/01/2007. Just to make sure it's not always the first of the month for startTS it's just a coincidence.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="compare.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/4020_compare.PNG" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 08:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278469#M712200</guid>
      <dc:creator />
      <dc:date>2011-05-06T08:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: getting the right values for the right code and time period</title>
      <link>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278470#M712202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I would do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//find the correct startTS&lt;/P&gt;&lt;P&gt;Left Join (Table1)&lt;/P&gt;&lt;P&gt;Intervalmatch (RequestTS, PrestationCode)&lt;/P&gt;&lt;P&gt;Load startTS,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endTS,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrestationCode&lt;/P&gt;&lt;P&gt;resident Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Join the Value&lt;/P&gt;&lt;P&gt;Left Join (Table1)&lt;/P&gt;&lt;P&gt;Load startTS,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PrestationCode,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;Resident Table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Table2; // Drop when you finished with it, otherwise you get syntetic keys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also drop fieds startTS and endTS at this stage if you want to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 08:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278470#M712202</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2011-05-06T08:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: getting the right values for the right code and time period</title>
      <link>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278471#M712204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for helping! It didn't fix the problem from the start cause i had some old data which was messing with my values but i did a where year(startTS) &amp;gt; '2005' and then i got the right values &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 09:33:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-the-right-values-for-the-right-code-and-time-period/m-p/278471#M712204</guid>
      <dc:creator />
      <dc:date>2011-05-06T09:33:44Z</dc:date>
    </item>
  </channel>
</rss>

