<?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: To join or not to Join in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784971#M1209932</link>
    <description>&lt;P&gt;np&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 22:44:21 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2021-02-22T22:44:21Z</dc:date>
    <item>
      <title>To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1782494#M1209667</link>
      <description>&lt;P&gt;hi guys&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;P&gt;The Attached is a very rudimentary explanation of the Scenario I've been handed - just using dummy data so I don't get fired...&lt;/P&gt;&lt;P&gt;I have an Events Table and an Event_Event_Relationship table.&lt;/P&gt;&lt;P&gt;Every event (in this case my birthday &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;) has 2 'parts'....a Request is sent to people to attend my birthday as well as a Response_received.&lt;/P&gt;&lt;P&gt;What totally confuses me, is the Relationship table...I link Event_id to Event_Id - but I dont know if this is correct?&lt;/P&gt;&lt;P&gt;1. Should I not be linking to BOTH Event_ID and Related_Event_ID?&lt;/P&gt;&lt;P&gt;2. What is the 'use'/potential of the field 'Type_Relation' term..&lt;/P&gt;&lt;P&gt;Possible scenarios:&lt;/P&gt;&lt;P&gt;1. I'd like to count the Event_Name (1 event in this case)&lt;/P&gt;&lt;P&gt;2. I'd like to count the amount of Requests that were sent, as well as the # of Responses_Received.&lt;/P&gt;&lt;P&gt;3. I'd like to identify Requests that were sent, that didnt get any responses ...and Identify these&lt;/P&gt;&lt;P&gt;4. I'd like to identify 'orphan' responses that didnt have requests sent (Just because the data is &lt;A href="mailto:cr@p" target="_blank" rel="noopener"&gt;cr@p&lt;/A&gt;&amp;nbsp;and it is possible)&lt;/P&gt;&lt;P&gt;Please may you assist? My brain is foggy and I'm stuck.&lt;/P&gt;&lt;P&gt;Much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 18:13:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1782494#M1209667</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-02-13T18:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784187#M1209838</link>
      <description>&lt;P&gt;Hi QFanatic,&lt;/P&gt;&lt;P&gt;How are you ?&amp;nbsp; Have you found a satisfying solution for your task ?&lt;/P&gt;&lt;P&gt;Yours is a very interesting question, and may have many different solutions.&lt;/P&gt;&lt;P&gt;Without knowing more details about the project, I could figure out a table like this:&lt;/P&gt;&lt;P&gt;structure:&amp;nbsp; Event_Name;Request_sent;Request_responded&lt;/P&gt;&lt;P&gt;fullfillment:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a) for sent... Event_Name; Yes; No or Null&amp;nbsp; &amp;nbsp; &amp;nbsp; b) for responded... Event_Name; No or Null; Yes&lt;/P&gt;&lt;P&gt;It might answer all your 4 scenarios, didn't it ?&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Marcos&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 13:25:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784187#M1209838</guid>
      <dc:creator>Marcos_Ferreira_dos_Santos</dc:creator>
      <dc:date>2021-02-19T13:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784433#M1209864</link>
      <description>Hello Marcos,&lt;BR /&gt;Thank you for your friendly reply.&lt;BR /&gt;&lt;BR /&gt;No I havent been able to solve this, I have left it on the back burner for&lt;BR /&gt;a while.&lt;BR /&gt;&lt;BR /&gt;I would love to hear how you got to these 4 scenarios?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 21 Feb 2021 04:40:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784433#M1209864</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-02-21T04:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784499#M1209880</link>
      <description>&lt;P&gt;you can de-normalize your first table this way:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;events:
load * inline [
Event_ID,Event_Name,Event_Type
1001,Lornas Birthday,Request_sent
1002,Lornas Birthday,Response_received
2001,As Birthday,Request_sent
2002,As Birthday,Response_received
3001,Bs Birthday,Request_sent
3002,Bs Birthday,Response_received
];

relationships:
load * inline [
Event_ID,Related_ID,Type_Relation
1001, 1002,Response_To Request
2001, 2002,Response_To Request
3001, 3002,Response_To Request
];

left join (events)
load Event_ID, Related_ID, Type_Relation
resident relationships;


left join (events)
load Event_ID as Related_ID, Event_Name as ResponseEventName, Event_Type as ResponseEventType
Resident events;


drop table relationships;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_0-1613937931225.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49511i297EB8D6392BBC30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_0-1613937931225.png" alt="edwin_0-1613937931225.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this assumes that there is only one response per request&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 20:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784499#M1209880</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-21T20:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784502#M1209881</link>
      <description>&lt;P&gt;if the expected responses are multiple you don't want to de-normalize&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;events:
load * inline [
Event_ID,Event_Name,Event_Type, Responder
1001,Lornas Birthday,Request_sent
1002,Lornas Birthday,Response_received, Person1
5002,Lornas Birthday,Response_received, Person2
6002,Lornas Birthday,Response_received, Person3
7002,Lornas Birthday,Response_received, Person4
2001,As Birthday,Request_sent
2002,As Birthday,Response_received, Person5
3001,Bs Birthday,Request_sent
3002,Bs Birthday,Response_received, Person6
];

relationships:
load * inline [
Event_ID,Related_ID,Type_Relation
1001, 1002,Response_To Request
1001, 5002,Response_To Request
1001, 6002,Response_To Request
1001, 7002,Response_To Request
2001, 2002,Response_To Request
3001, 3002,Response_To Request
];


left join (relationships)
load Event_ID as Related_ID, Event_Name as ResponseEventName,Event_Type as ResponseEventType, Responder
Resident events;

drop field Responder from events;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_1-1613938575833.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49512i7B5893A4E546C177/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_1-1613938575833.png" alt="edwin_1-1613938575833.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 20:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784502#M1209881</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-21T20:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784536#M1209884</link>
      <description>&lt;P&gt;Thank you Marcos,&lt;/P&gt;&lt;P&gt;Every Request should only have one response. Thank you so much for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate..&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 06:30:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784536#M1209884</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-02-22T06:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784544#M1209885</link>
      <description>&lt;P&gt;Edwin,&lt;/P&gt;&lt;P&gt;Last thing ...&lt;/P&gt;&lt;P&gt;To determine these criteria with your first solution..please check if I got that right?&lt;/P&gt;&lt;P&gt;1. I'd like to count the Event_Name (1 event in this case). = Count(Distinct Event_name)&lt;/P&gt;&lt;P&gt;2. I'd like to count the amount of Requests that were sent, as well as the # of Responses_Received. = count(Event_type = Request_Type), right?&lt;/P&gt;&lt;P&gt;3. I'd like to identify Requests that were sent, that didnt get any responses ...and Identify these..&lt;STRONG&gt;not sure of this&lt;/STRONG&gt; &lt;STRONG&gt;one..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4. I'd like to identify 'orphan' responses that didnt have requests sent (Just because the data is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:cr@p" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;cr@p&lt;/A&gt;&amp;nbsp;and it is possible&lt;STRONG&gt;) and this one..&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe a good idea is if I rather identify each Event with '1' as IsEvent = then I can just sum them in charts.&lt;/P&gt;&lt;P&gt;1. Where and how would&amp;nbsp; I do same for Response and Request?&lt;/P&gt;&lt;P&gt;2. And then lastly - same for the 'orphan' scenario.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 07:20:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784544#M1209885</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-02-22T07:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784777#M1209914</link>
      <description>&lt;P&gt;1. I'd like to count the Event_Name (1 event in this case). = Count(Distinct Event_name)&amp;nbsp; &amp;lt;EDWIN&amp;gt;if you wish to count distinct names yes, alternatively you&amp;nbsp; count distinct EVENT IDs where event type = to a request&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I'd like to count the amount of Requests that were sent, as well as the # of Responses_Received. = count(Event_type = Request_Type), right? &amp;lt;EDWIN&amp;gt; same comment as above, also to make it easier, you can flag each sent request if it was responded to.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the part that looks up the response:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;left join (events)
load Event_ID, Related_ID, Type_Relation, 1 as IsRespondedTo
resident relationships;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;its a bit tricky to find those that weren't responded to so if you add this at the end of your script:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;rename table events to tmpEvents;
noconcatenate events: load *, if(Event_Type='Request_sent', if(IsRespondedTo=1,1,0) ) as %IsRespondedTo
resident tmpEvents;
drop table tmpEvents;
drop field IsRespondedTo;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;so now those with 0 flag didn't receive a response and set analysis is simpler&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. I'd like to identify Requests that were sent, that didnt get any responses ...and Identify these..&lt;STRONG&gt;not sure of this&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;one..&amp;nbsp;&lt;/STRONG&gt; &amp;lt;EDWIN&amp;gt; previous will answer this&lt;/P&gt;&lt;P&gt;4. I'd like to identify 'orphan' responses that didnt have requests sent (Just because the data is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="mailto:cr@p" target="_blank" rel="noopener nofollow noopener noreferrer noopener noreferrer"&gt;cr@p&lt;/A&gt;&amp;nbsp;and it is possible&lt;STRONG&gt;) and this one..&lt;/STRONG&gt; &amp;lt;EDWIN&amp;gt;you can implement a similar solution for requests.&amp;nbsp; left join relationships based on&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;left join (events)
load Related_ID as Event_ID, 1 as hasRequest
resident relationships;&lt;/LI-CODE&gt;&lt;P&gt;then add on to the code in&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;noconcatenate events: load *, if(Event_Type='Request_sent', if(IsRespondedTo=1,1,0) ) as %IsRespondedTo, if(Event_Type='Request_received', if(hasRequest=1,1,0) ) as %HasRequest
resident tmpEvents;
drop table tmpEvents;
drop field IsRespondedTo, hasRequest;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 Feb 2021 14:49:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784777#M1209914</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-22T14:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784918#M1209928</link>
      <description>&lt;P&gt;you are a Rockstar! Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 19:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784918#M1209928</guid>
      <dc:creator>QFanatic</dc:creator>
      <dc:date>2021-02-22T19:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: To join or not to Join</title>
      <link>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784971#M1209932</link>
      <description>&lt;P&gt;np&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 22:44:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/To-join-or-not-to-Join/m-p/1784971#M1209932</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-22T22:44:21Z</dc:date>
    </item>
  </channel>
</rss>

