<?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: Re: How to join with timestamp in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797388#M667400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up using peek() -method, but I think self-joining with loop could give more flexibility in some situations. Also the join not working is bugging me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Nov 2014 06:04:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-11T06:04:07Z</dc:date>
    <item>
      <title>How to join with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797384#M667396</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 trying to calculate rolling averages, so I need the values from previous tables. For some reason my join doesn't work properly, and I can't figure out why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14156168726208462 jive_macro_code" jivemacro_uid="_14156168726208462" modifiedtitle="true"&gt;
&lt;P&gt;temp:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Timestamp, Value&lt;/P&gt;
&lt;P&gt;'1.1.2014 01:00', 1.1&lt;/P&gt;
&lt;P&gt;'1.1.2014 02:00', 0.4&lt;/P&gt;
&lt;P&gt;'1.1.2014 03:00', 0.2&lt;/P&gt;
&lt;P&gt;'1.1.2014 04:00', 0.8&lt;/P&gt;
&lt;P&gt;'1.1.2014 05:00', 1.5&lt;/P&gt;
&lt;P&gt;'1.1.2014 06:00', 1.8&lt;/P&gt;
&lt;P&gt;'1.1.2014 07:00', 1.9&lt;/P&gt;
&lt;P&gt;'1.1.2014 08:00', 2.1];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;final:&lt;/P&gt;
&lt;P&gt;NOCONCATENATE LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; timestamp#(Timestamp, 'dd.MM.yyyy HH:mm') AS Key.Timestamp,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Value&lt;/P&gt;
&lt;P&gt;RESIDENT temp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR i = 1 TO 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp; t:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NOCONCATENATE LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; timestamp#(Key.Timestamp - Maketime($(i)), 'dd.MM.yyyy HH:mm') AS Key.Timestamp,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Value AS Value_t_minus_$(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; RESIDENT final;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; JOIN (final)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; timestamp#(Key.Timestamp, 'dd.MM.yyyy HH:mm') AS Key.Timestamp,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Value_t_minus_$(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; RESIDENT t;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DROP TABLE t;&lt;/P&gt;
&lt;P&gt;NEXT i;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE temp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm making sure my timestamps are the same format, so this shouldn't be the problem. Why isn't this working properly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 10:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797384#M667396</guid>
      <dc:creator />
      <dc:date>2014-11-10T10:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to join with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797385#M667397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if your approach could work. I think you need rather a logic with peek() to check the previous row. Have a look on these example for some hints:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/634045"&gt;Re: Re: cummulating  previous interval days per yearmonth&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/385321"&gt;Using Peek to get a Cummuliative Number&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Nov 2014 11:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797385#M667397</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-11-10T11:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to join with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797386#M667398</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;maybe this works better, because you don't have to interpret timestamps that are already numeric?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 1 TO 2 &lt;/P&gt;&lt;P&gt;&amp;nbsp; t: &lt;/P&gt;&lt;P&gt;&amp;nbsp; NOCONCATENATE LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;timestamp&lt;/STRONG&gt;&lt;/SPAN&gt;(Key.Timestamp - Maketime($(i)), 'dd.MM.yyyy HH:mm') AS Key.Timestamp, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Value AS Value_t_minus_$(i) &lt;/P&gt;&lt;P&gt;&amp;nbsp; RESIDENT final; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; JOIN (final) &lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD &lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt; Key.Timestamp&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Value_t_minus_$(i) &lt;/P&gt;&lt;P&gt;&amp;nbsp; RESIDENT t; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; DROP TABLE t; &lt;/P&gt;&lt;P&gt;NEXT i; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 00:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797386#M667398</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-11-11T00:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to join with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797387#M667399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still can't get it to join properly. Here's the current version:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14156857029384397" jivemacro_uid="_14156857029384397"&gt;
&lt;P&gt;temp:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;Timestamp, Value&lt;/P&gt;
&lt;P&gt;'1.1.2014 01:00', 1.1&lt;/P&gt;
&lt;P&gt;'1.1.2014 02:00', 0.4&lt;/P&gt;
&lt;P&gt;'1.1.2014 03:00', 0.2&lt;/P&gt;
&lt;P&gt;'1.1.2014 04:00', 0.8&lt;/P&gt;
&lt;P&gt;'1.1.2014 05:00', 1.5&lt;/P&gt;
&lt;P&gt;'1.1.2014 06:00', 1.8&lt;/P&gt;
&lt;P&gt;'1.1.2014 07:00', 1.9&lt;/P&gt;
&lt;P&gt;'1.1.2014 08:00', 2.1];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;final:&lt;/P&gt;
&lt;P&gt;NOCONCATENATE LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; timestamp#(Timestamp, 'd.M.yyyy HH:mm') AS Key.Timestamp,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Value&lt;/P&gt;
&lt;P&gt;RESIDENT temp;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR i = 1 TO 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp; t:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NOCONCATENATE LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; timestamp(Key.Timestamp - Maketime(1 * $(i)), 'd.M.yyyy HH:mm') AS Key.Timestamp,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Value AS Value_t_minus_$(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; RESIDENT final;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; JOIN (final)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Key.Timestamp,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Value_t_minus_$(i)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; RESIDENT t;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; DROP TABLE t;&lt;/P&gt;
&lt;P&gt;NEXT i;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE temp;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 06:02:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797387#M667399</guid>
      <dc:creator />
      <dc:date>2014-11-11T06:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to join with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797388#M667400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ended up using peek() -method, but I think self-joining with loop could give more flexibility in some situations. Also the join not working is bugging me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 06:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797388#M667400</guid>
      <dc:creator />
      <dc:date>2014-11-11T06:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to join with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797389#M667401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe the reason for a not working joining is the timestamp - 1 or 2 hours. This would be produce a number with many decimals which would be rounded more or less correctly - see here: &lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/12/17/rounding-errors" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/12/17/rounding-errors"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/12/17/rounding-errors&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you should try it with something like round(num()). Maybe you creates an additionally table (with qualify) to look what your timestamp - 1 hour exactly returns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 08:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797389#M667401</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-11-11T08:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to join with timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797390#M667402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Was this resolved? I believe you were not able to join because Qlik store decimal value differently so 1.14 doesn't necessarily equal 1.14 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 03:09:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-join-with-timestamp/m-p/797390#M667402</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-31T03:09:06Z</dc:date>
    </item>
  </channel>
</rss>

