<?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 Join in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Join/m-p/2025794#M84583</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the following Table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smobariki_0-1673689364949.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/98063iF413C4DF6628B108/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smobariki_0-1673689364949.png" alt="smobariki_0-1673689364949.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note: 100 stands for IN and 200 stands for OUT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I am trying to transform the above table into the&amp;nbsp; following table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smobariki_1-1673689444822.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/98064i2BABF88CC2D5B313/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smobariki_1-1673689444822.png" alt="smobariki_1-1673689444822.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;any ideas would be appreciable.&lt;/P&gt;
&lt;P&gt;many thanks,&lt;/P&gt;
&lt;P&gt;sharbel&lt;/P&gt;</description>
    <pubDate>Sat, 14 Jan 2023 10:02:38 GMT</pubDate>
    <dc:creator>Sharbel</dc:creator>
    <dc:date>2023-01-14T10:02:38Z</dc:date>
    <item>
      <title>Join</title>
      <link>https://community.qlik.com/t5/App-Development/Join/m-p/2025794#M84583</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have the following Table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smobariki_0-1673689364949.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/98063iF413C4DF6628B108/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smobariki_0-1673689364949.png" alt="smobariki_0-1673689364949.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note: 100 stands for IN and 200 stands for OUT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I am trying to transform the above table into the&amp;nbsp; following table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smobariki_1-1673689444822.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/98064i2BABF88CC2D5B313/image-size/medium?v=v2&amp;amp;px=400" role="button" title="smobariki_1-1673689444822.png" alt="smobariki_1-1673689444822.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;any ideas would be appreciable.&lt;/P&gt;
&lt;P&gt;many thanks,&lt;/P&gt;
&lt;P&gt;sharbel&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jan 2023 10:02:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Join/m-p/2025794#M84583</guid>
      <dc:creator>Sharbel</dc:creator>
      <dc:date>2023-01-14T10:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/App-Development/Join/m-p/2025814#M84586</link>
      <description>&lt;P&gt;One solution using a join might be:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarcoWedel_0-1673700376910.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/98065i112176EE977213B5/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarcoWedel_0-1673700376910.png" alt="MarcoWedel_0-1673700376910.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;table1:
LOAD *,
     If(emp_No=Previous(emp_No),If(Id=100,Peek(PresenceID)+1,Peek(PresenceID)),1) as PresenceID
Inline [
emp_No, date, time, Id
1228, 13/01/2023, 06:11:47, 100
1228, 13/01/2023, 12:48:48, 200
1228, 13/01/2023, 15:17:54, 100
1228, 13/01/2023, 17:11:07, 200
1228, 16/01/2023, 06:20:00, 100
1228, 16/01/2023, 17:10:00, 200
1228, 17/01/2023, 06:30:00, 100
1228, 17/01/2023, 08:15:00, 200
1228, 17/01/2023, 09:45:00, 100
1228, 17/01/2023, 13:20:00, 200
1228, 17/01/2023, 13:50:00, 100
1228, 17/01/2023, 16:30:00, 200
1229, 13/01/2023, 07:11:47, 100
1229, 13/01/2023, 13:48:48, 200
1229, 13/01/2023, 16:17:54, 100
1229, 13/01/2023, 18:11:07, 200
1229, 16/01/2023, 07:20:00, 100
1229, 16/01/2023, 18:10:00, 200
1229, 17/01/2023, 07:30:00, 100
1229, 17/01/2023, 09:15:00, 200
1229, 17/01/2023, 10:45:00, 100
1229, 17/01/2023, 14:20:00, 200
1229, 17/01/2023, 14:50:00, 100
1229, 17/01/2023, 17:30:00, 200
];


table2:
LOAD emp_No,
     PresenceID,
     date,
     time as Time_IN
Resident table1
Where Id=100;

Join

LOAD emp_No,
     PresenceID,
     date,
     time as Time_OUT
Resident table1
Where Id=200;

DROP Table table1;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jan 2023 12:47:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Join/m-p/2025814#M84586</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2023-01-14T12:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/App-Development/Join/m-p/2025828#M84587</link>
      <description>&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jan 2023 16:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Join/m-p/2025828#M84587</guid>
      <dc:creator>Sharbel</dc:creator>
      <dc:date>2023-01-14T16:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/App-Development/Join/m-p/2025832#M84588</link>
      <description>&lt;P&gt;You're welcome&lt;/P&gt;
&lt;P&gt;Please close your thread by accepting a solution if your issue is solved, thanks&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jan 2023 17:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Join/m-p/2025832#M84588</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2023-01-14T17:46:58Z</dc:date>
    </item>
  </channel>
</rss>

