<?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: Hierarchy with cyclic elements in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311089#M711324</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the function Hierarchy needed the values return in order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know too how after invert the parameters the function works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jun 2011 19:33:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-22T19:33:35Z</dc:date>
    <item>
      <title>Hierarchy with cyclic elements</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311084#M711316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, guys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with my BOM hierarchy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have source table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="border-collapse: collapse; width: 25%; border-width: 1px; border-color: #000000; border-style: solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc; width: 2px;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;NodeID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc; width: 2px;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;ParentID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;225487&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;103796&lt;/TD&gt;&lt;TD&gt;225487&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;140359&lt;/TD&gt;&lt;TD&gt;103796&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;140359&lt;/TD&gt;&lt;TD&gt;225487&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100000&lt;/TD&gt;&lt;TD&gt;&lt;BR /&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100001&lt;/TD&gt;&lt;TD&gt;100000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100002&lt;/TD&gt;&lt;TD&gt;100001&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, if we will draw hierarchy scheme, we will get like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Cyclic in hierarchy.png" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/5378_Cyclic+in+hierarchy.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;on the &lt;STRONG&gt;left&lt;/STRONG&gt; picture we see a simple (good) situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but on the &lt;STRONG&gt;right&lt;/STRONG&gt;&amp;nbsp; picture, we see the cyclic links in elements of hierarchy and Qlikview can not managed it by the HIERARCHY statement.&lt;/P&gt;&lt;P&gt;QlikView doesn't create a link, which I crossed out on the right picture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I need it. How I can create this link&amp;nbsp; in the hierarchy?&lt;/P&gt;&lt;P&gt;I want to get something like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;225487 -&amp;gt; 103796 -&amp;gt; 140359&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;225487 -&amp;gt; 140359 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I achive it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached small qvw-example ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 12:44:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311084#M711316</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2011-06-22T12:44:09Z</dc:date>
    </item>
    <item>
      <title>Hierarchy with cyclic elements</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311085#M711318</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 don't know what happened, but if you change the sintaxe of hierarchy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIERARCHY(NodeID, ParentID, NodeName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIERARCHY(ParentID, NodeID, NodeName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have the result that you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know.. i tried with in_line table and result are OK, but with using joins are problemn.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 14:58:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311085#M711318</guid>
      <dc:creator />
      <dc:date>2011-06-22T14:58:46Z</dc:date>
    </item>
    <item>
      <title>Hierarchy with cyclic elements</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311086#M711319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eduardo, thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's incredible!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is it work ? I can't understand...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somebody can me explain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 15:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311086#M711319</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2011-06-22T15:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hierarchy with cyclic elements</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311087#M711321</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 put the result of joins tables in "IN LINE" and the function HIERARCHY executed OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;tab:&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;LOAD * INLINE [&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeID_, ParentID_, NodeName_&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 225487, , B0&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 103796, 225487, B1&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 140359, 225487, B2&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 140359, 103796, B2&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;Extended:&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;HIERARCHY(NodeID_, ParentID_, NodeName_)&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;LOAD&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;NodeID_,&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;ParentID_, // as Parent,&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;NodeName_&lt;/EM&gt;&lt;BR /&gt;&lt;EM style="font-size: 8pt;"&gt;RESIDENT tab;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;DROP TABLE tab;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we used joins in second plan the system generate other table (Cartesian Product) the return the values. I believe that can be a bug in this function when exists null values in the table created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So "IN LINE" just return 4 rows, and using the joins I think that returns different results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I save the two results in qvd because then returns just four rows in final table, but the files created are different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that is a bug in the function hierarchy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 17:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311087#M711321</guid>
      <dc:creator />
      <dc:date>2011-06-22T17:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hierarchy with cyclic elements</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311088#M711323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo, sorry but I don't understand your explanation,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I played with order of lines in source data and found one strange behaviour...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we have such order of lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NodeID, ParentID, NodeName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100000, , A0&lt;/P&gt;&lt;P&gt;&amp;nbsp; 225487, , B0&lt;/P&gt;&lt;P&gt;&amp;nbsp; 103796, 225487, B1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 140359, 225487, B2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 140359, 103796, B2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100001, 100000, A1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100002, 100001, A2&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;HIERARCHY function is worked OK.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;but if we change order like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;NodeID, ParentID, NodeName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100000, , A0&lt;/P&gt;&lt;P&gt;&amp;nbsp; 225487, , B0&lt;/P&gt;&lt;P&gt;&amp;nbsp; 140359, 225487, B2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 103796, 225487, B1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 140359, 103796, B2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100001, 100000, A1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100002, 100001, A2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NodeID, ParentID, NodeName&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100000, , A0&lt;/P&gt;&lt;P&gt;&amp;nbsp; 225487, , B0&lt;/P&gt;&lt;P&gt;&amp;nbsp; 140359, 225487, B2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 140359, 103796, B2&lt;/P&gt;&lt;P&gt;&amp;nbsp; 103796, 225487, B1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100001, 100000, A1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 100002, 100001, A2&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;HIERARCHY function do NOT work after this changes&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I can give only one&amp;nbsp; assumption- source lines must be sorted by&amp;nbsp; NodeName.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but I can't understand How I can do it if I don't have NodeName and I use NodeID&amp;nbsp; instead of NodeName, like this:&lt;/P&gt;&lt;P&gt;Extended:&lt;/P&gt;&lt;P&gt;HIERARCHY(NodeID_, ParentID_, NodeName_)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeID as NodeID_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ParentID as ParentID_,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeID as NodeName_&lt;/P&gt;&lt;P&gt;RESIDENT tmp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 19:12:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311088#M711323</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2011-06-22T19:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hierarchy with cyclic elements</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311089#M711324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the function Hierarchy needed the values return in order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know too how after invert the parameters the function works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 19:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311089#M711324</guid>
      <dc:creator />
      <dc:date>2011-06-22T19:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hierarchy with cyclic elements</title>
      <link>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311090#M711325</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 made the experience that HIERARCHY command results depend on sort order of table records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I do not know why this is the case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 12:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Hierarchy-with-cyclic-elements/m-p/311090#M711325</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2014-06-05T12:42:51Z</dc:date>
    </item>
  </channel>
</rss>

