<?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: Transitive relationship in Management &amp; Governance</title>
    <link>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777089#M17213</link>
    <description>&lt;P&gt;Hi SonPhan,&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;[temp]:&lt;BR /&gt;Load * inline [&lt;BR /&gt;Employee, Boss&lt;BR /&gt;100, 105&lt;BR /&gt;177, 180&lt;BR /&gt;105, 911&lt;BR /&gt;400, 402&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Left Join ([temp])&lt;BR /&gt;[temp2]:&lt;BR /&gt;Load&lt;BR /&gt;Employee as Boss,&lt;BR /&gt;Boss as New_Employee&lt;BR /&gt;resident [temp];&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;Final:&lt;BR /&gt;Load Employee,&lt;BR /&gt;Boss&lt;BR /&gt;Resident temp;&lt;/P&gt;&lt;P&gt;Concatenate(Final)&lt;BR /&gt;Load&lt;BR /&gt;Employee,&lt;BR /&gt;New_Employee as Boss&lt;BR /&gt;Resident temp where len(New_Employee) &amp;gt; 0;&lt;/P&gt;&lt;P&gt;Drop table temp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2021 12:16:08 GMT</pubDate>
    <dc:creator>jyothish8807</dc:creator>
    <dc:date>2021-01-25T12:16:08Z</dc:date>
    <item>
      <title>Transitive relationship</title>
      <link>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777077#M17211</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a question regarding scripting in QS.&lt;/P&gt;&lt;P&gt;Lets say I have a table temp.&amp;nbsp;&lt;/P&gt;&lt;P&gt;[temp]:&lt;BR /&gt;Load * inline [&lt;BR /&gt;Employee, Boss&lt;BR /&gt;100, 105&lt;BR /&gt;177, 180&lt;BR /&gt;105, 911&lt;BR /&gt;400, 402&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to pair all possible relationship. The result should look like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Load * inline [&lt;BR /&gt;Employee, Boss&lt;BR /&gt;100, 105&lt;BR /&gt;177, 180&lt;BR /&gt;105, 911&lt;BR /&gt;400, 402&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;100, 911];&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So in my example 100 -&amp;gt; 105 and 105 -&amp;gt; 911 means that people with the Ids 100 and 911 are in such a relationship. So I want their number to be listed in my result table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope u can help me.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Phan Thanh Son&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:34:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777077#M17211</guid>
      <dc:creator>SonPhan</dc:creator>
      <dc:date>2024-11-16T17:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Transitive relationship</title>
      <link>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777089#M17213</link>
      <description>&lt;P&gt;Hi SonPhan,&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;[temp]:&lt;BR /&gt;Load * inline [&lt;BR /&gt;Employee, Boss&lt;BR /&gt;100, 105&lt;BR /&gt;177, 180&lt;BR /&gt;105, 911&lt;BR /&gt;400, 402&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Left Join ([temp])&lt;BR /&gt;[temp2]:&lt;BR /&gt;Load&lt;BR /&gt;Employee as Boss,&lt;BR /&gt;Boss as New_Employee&lt;BR /&gt;resident [temp];&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;Final:&lt;BR /&gt;Load Employee,&lt;BR /&gt;Boss&lt;BR /&gt;Resident temp;&lt;/P&gt;&lt;P&gt;Concatenate(Final)&lt;BR /&gt;Load&lt;BR /&gt;Employee,&lt;BR /&gt;New_Employee as Boss&lt;BR /&gt;Resident temp where len(New_Employee) &amp;gt; 0;&lt;/P&gt;&lt;P&gt;Drop table temp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 12:16:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777089#M17213</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2021-01-25T12:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Transitive relationship</title>
      <link>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777094#M17214</link>
      <description>&lt;P&gt;A simple load script to create your posted result would be:&lt;/P&gt;&lt;P&gt;[temp2]:&lt;BR /&gt;Load * inline [&lt;BR /&gt;Employee, Boss&lt;BR /&gt;100, 105&lt;BR /&gt;177, 180&lt;BR /&gt;105, 911&lt;BR /&gt;400, 402&lt;BR /&gt;911, 125&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Left Join ([temp2])&lt;BR /&gt;Load Employee as Boss,&lt;BR /&gt;Boss as Boss2&lt;BR /&gt;Resident [temp2];&lt;/P&gt;&lt;P&gt;[temp]:&lt;BR /&gt;Load Employee,&lt;BR /&gt;Boss&lt;BR /&gt;Resident temp2;&lt;/P&gt;&lt;P&gt;Load Employee,&lt;BR /&gt;Boss2 as Boss&lt;BR /&gt;Resident [temp2]&lt;BR /&gt;where not isnull(Boss2);&lt;/P&gt;&lt;P&gt;drop table [temp2];&lt;/P&gt;&lt;P&gt;This will only give you one level of relationship, Employee - Boss.&amp;nbsp; Since this is an adjacent node table, you may want to look into using the Hierarchy prefix in your load script.&amp;nbsp; You would need an Employee Name column.&amp;nbsp; An example would be:&lt;/P&gt;&lt;P&gt;[temp]:&lt;BR /&gt;Hierarchy (Employee, Boss, EmployeeName)&lt;BR /&gt;Load * inline [&lt;BR /&gt;Employee, EmployeeName, Boss&lt;BR /&gt;100, Employee A, 105&lt;BR /&gt;177, Employee B, 180&lt;BR /&gt;105, Employee C, 911&lt;BR /&gt;400, Employee D, 402&lt;BR /&gt;911, Employee E, 125&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;This "flattens out" the hierarchy in your table and would show you all relationships at different levels.&amp;nbsp; It can useful for analysis.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 12:27:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777094#M17214</guid>
      <dc:creator>GaryGiles</dc:creator>
      <dc:date>2021-01-25T12:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Transitive relationship</title>
      <link>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777095#M17215</link>
      <description>&lt;P&gt;Thanks for your quick reply, unfortunately the solution is still not quite correct.&lt;/P&gt;&lt;P&gt;For this example:&lt;/P&gt;&lt;P&gt;[temp]:&lt;BR /&gt;Load * inline [&lt;BR /&gt;Employee, Boss&lt;BR /&gt;100, 105&lt;BR /&gt;177, 180&lt;BR /&gt;105, 911&lt;BR /&gt;400, 402,&lt;BR /&gt;911, 1000&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;The relation 100 -&amp;gt; 1000 is missing.&lt;/P&gt;&lt;P&gt;However, I will continue to build on your proposed solution.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 12:33:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Management-Governance/Transitive-relationship/m-p/1777095#M17215</guid>
      <dc:creator>SonPhan</dc:creator>
      <dc:date>2021-01-25T12:33:11Z</dc:date>
    </item>
  </channel>
</rss>

