<?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: JOIN after an aggregation - plz help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/JOIN-after-an-aggregation-plz-help/m-p/1143180#M630665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got it. The issue was the format: In my main table, the date and time are not numeric, but - well, a date and a time &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; For some reason, in my aggregated table, the outcome was numeric - I just inserted a num() function in that last LOAD and now it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Sep 2016 11:49:18 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2016-09-05T11:49:18Z</dc:date>
    <item>
      <title>JOIN after an aggregation - plz help</title>
      <link>https://community.qlik.com/t5/QlikView/JOIN-after-an-aggregation-plz-help/m-p/1143179#M630664</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;in the script I'm currently working on, there is one number (&amp;gt;&amp;gt;Serial_Lot&amp;lt;&amp;lt;) that all records have in common - but there are 43 different groups (&amp;gt;&amp;gt;Tracks&amp;lt;&amp;lt;) which are part of this &amp;gt;&amp;gt;Serial_Lot&amp;lt;&amp;lt;.&lt;/P&gt;&lt;P&gt;=&amp;gt; For every Track, there are a number of bookings and I'm interested in the last one - but they have all been appended into one long table, so I have to distinguish between the Tracks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; I do a RESIDENT LOAD and load a small aggregated table where I have one record for every Track, and the exact date_and_time of the last booking. That works fine so far.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; In this table, I need the type (&amp;gt;&amp;gt;TranCode&amp;lt;&amp;lt;) of that booking because I will have to continue processing my data accordingly.&lt;/P&gt;&lt;P&gt;My last LOAD looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Last_Bookings:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRACKING_NUMBER&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Track_v2&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRAN_DATE_TD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; + &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRAN_DATE_Time&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Zeitstempel_letzte_Buchung&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Transaktionen_Archiv&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;GROUP&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;BY&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TRACKING_NUMBER&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Now I would like to add (join) the TRAN_CODE from that same base_table - the JOIN would have to be on both fields. So I would go like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;INNER JOIN (Last_Bookings)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;TRACKING_NUMBER as Track_v2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;(TRAN_DATE_TD + TRAN_DATE_Time) as Zeitstempel_letzte_Buchung,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;TRAN_CODE as TranCode_letzte_Buchung&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;RESIDENT Transaktionen_Archiv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&amp;lt;=&amp;gt; Well, I already tried that, it didn't work. The JOIN was apparently done on only the Track_Number, I got 14 records instead of 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Can anyone spot the mistake?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Thanks a lot!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;DataNibbler&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 11:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JOIN-after-an-aggregation-plz-help/m-p/1143179#M630664</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2016-09-05T11:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: JOIN after an aggregation - plz help</title>
      <link>https://community.qlik.com/t5/QlikView/JOIN-after-an-aggregation-plz-help/m-p/1143180#M630665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got it. The issue was the format: In my main table, the date and time are not numeric, but - well, a date and a time &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; For some reason, in my aggregated table, the outcome was numeric - I just inserted a num() function in that last LOAD and now it works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 11:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/JOIN-after-an-aggregation-plz-help/m-p/1143180#M630665</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2016-09-05T11:49:18Z</dc:date>
    </item>
  </channel>
</rss>

