<?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: Need to create hierarchy using only 2 fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925531#M320304</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gentlemen I'm getting close here.&amp;nbsp; Thanks for all of the responses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sudeep, what's going on man?&amp;nbsp; We will need to catch up offline.&amp;nbsp; In regards to your post I tested the code you provided and it covers half of the requirement.&amp;nbsp; The problem is, I want the ability to select Resource B from the hierarchy and see resource B1, B2 and then B11, B12, B13, B21 and B22 since they are associated to B1 and B2.&amp;nbsp; With the approach you provided I would need to highlight all of them individually in order to accomplish this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to just select Resource B from a list box and all of the children are automatically selected.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Sep 2015 17:25:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-23T17:25:11Z</dc:date>
    <item>
      <title>Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925524#M320297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to create a hierarchy utilizing only 2 fields.&amp;nbsp; The parent field is 'Resource Manager' and the child is 'Resource'.&amp;nbsp; The relationship already exists between the two fields, the problem is it only shows the direct Resources associated to the Resource Manager.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Resource Manager&lt;/SPAN&gt;:&amp;nbsp; Simon&lt;/P&gt;&lt;P&gt;Resources:&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;Tom&lt;/SPAN&gt; and &lt;SPAN style="color: #0000ff;"&gt;Scott&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resource Manager:&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;Tom&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Resources:&amp;nbsp; Betty and Jean&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resource Manager: &lt;SPAN style="color: #0000ff;"&gt;Scott&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Resources:&amp;nbsp; Chris, Tyler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the above example if I select Simon, I'm only able to see his direct resources Tom and Scott.&amp;nbsp; I want to be able to see Tom and Scott as well as their direct resources. So I would like to see Tom, Scott, Betty, Jean, Chris and Tyler.&amp;nbsp; How do I setup a hierarchy like this when I only have 2 fields, the Resource Manager and Resource.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 13:39:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925524#M320297</guid>
      <dc:creator />
      <dc:date>2015-09-23T13:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925525#M320298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your load script, use the Hierarchy function to recurse through the data that represents Mangers and Employees. Use the resulting structure, specifically the 'PathName' as a delimited path, in a List object.&amp;nbsp; Set the 'Show as TreeView' property on the General tab of the Listbox.&amp;nbsp; You should get what you are looking for.&lt;/P&gt;&lt;P&gt;...PB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 14:18:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925525#M320298</guid>
      <dc:creator>pbk</dc:creator>
      <dc:date>2015-09-23T14:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925526#M320299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 14:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925526#M320299</guid>
      <dc:creator />
      <dc:date>2015-09-23T14:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925527#M320300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&amp;nbsp; The problem is I need to develop multiple levels of resource managers.&amp;nbsp; From the example I provided you can see that I need to be able to select Simon and see all of his directs and their directs.&amp;nbsp; So basically I need to find a way to build multiple levels of the manager hierarchy with only 2 fields.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 14:35:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925527#M320300</guid>
      <dc:creator />
      <dc:date>2015-09-23T14:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925528#M320301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this if you use one record per person, and the second field is the parent. Hence&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[Person, Parent&lt;/P&gt;&lt;P&gt;Simon,&lt;/P&gt;&lt;P&gt;Tom, Simon&lt;/P&gt;&lt;P&gt;Scott, Simon&lt;/P&gt;&lt;P&gt;Betty, Tom&lt;/P&gt;&lt;P&gt;Jean, Tom&lt;/P&gt;&lt;P&gt;etc... ];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This table you can subsequently resolve using a Hierarchy prefix:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hierarchy (PersonID, Parent, PersonName)&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Person as PersonID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Person as PersonName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Parent as ParentID&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 14:50:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925528#M320301</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2015-09-23T14:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925529#M320302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HIC beat me to it....&lt;/P&gt;&lt;P&gt;The Hierarchy function requires 3 input fields. But of course you can use the same field twice, as in HIC's example.&lt;/P&gt;&lt;P&gt;...PB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 15:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925529#M320302</guid>
      <dc:creator>pbk</dc:creator>
      <dc:date>2015-09-23T15:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925530#M320303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeremy,&lt;/P&gt;&lt;P&gt;How are you. long time...&lt;/P&gt;&lt;P&gt;Hope all is well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm just adding little bit more to HIC's response. In case you have a requirement to display the hierarchy in a list box then you can use the below approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;Hierarchy (ResourceID, ManagerID, ResourceName,,ResourceName,[Resource Path],'|',[Resource Depth])&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resource as ResourceID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; resource as ResourceName,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; manager as ManagerID&lt;/P&gt;&lt;P&gt;From [..\..\hier.xlsx] (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UI:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="T182043.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99844_T182043.PNG" style="height: 384px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sudeep&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 15:57:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925530#M320303</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2015-09-23T15:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925531#M320304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gentlemen I'm getting close here.&amp;nbsp; Thanks for all of the responses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sudeep, what's going on man?&amp;nbsp; We will need to catch up offline.&amp;nbsp; In regards to your post I tested the code you provided and it covers half of the requirement.&amp;nbsp; The problem is, I want the ability to select Resource B from the hierarchy and see resource B1, B2 and then B11, B12, B13, B21 and B22 since they are associated to B1 and B2.&amp;nbsp; With the approach you provided I would need to highlight all of them individually in order to accomplish this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to just select Resource B from a list box and all of the children are automatically selected.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 17:25:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925531#M320304</guid>
      <dc:creator />
      <dc:date>2015-09-23T17:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925532#M320305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah maybe you can use a drill group named as "Resource" having all the level of resource names and then use that drill group in your list box. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="T182043_2.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99872_T182043_2.PNG" style="height: 193px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;So now when you select B from the Resource list box it will only show the next level related to B and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;IMG alt="T182043_3.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/99873_T182043_3.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 19:17:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925532#M320305</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2015-09-23T19:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925533#M320306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Sudeep, for some reason I did not even think of a drill group. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In theory the solution you provided should work, the problem is as you may know I'm working with a very large data set (all resources).&amp;nbsp; There can be as many as 20 levels of resources so when I run the script it runs for hours.&amp;nbsp; I left it run yesterday afternoon and it ran for 10 hours returning 3.5 billion rows of data.&amp;nbsp; All of my memory was sucked up so it shut down at that point.&amp;nbsp; I'm currently running it off the server and I'm at 3 hours now and it's still running, which does not meet our standards. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any other ways to build out this hierarchy. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 15:11:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925533#M320306</guid>
      <dc:creator />
      <dc:date>2015-09-24T15:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925534#M320307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;3.5 billion records seems huge. Is that the no of records present in source table or the results you are getting from the hierarchy load. I think it would be better to consider below given approach while building it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Check if you can find a flag field in the data source table that would indicate a record as active so that you can limit your data load to active resources only.&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="font-size: 13.3333px;"&gt;Load resource data in a qvw by implementing an incremental load so that it won't load the history repeatedly and then store the data in a qvd. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3. Create a separate QVW just for hier QVD generation a single job dedicated for hierarchy data load. (I think it would be better to call the hier function on the data from a table within that qvw loaded from a QVD) I know there are 19 levels or more but in the past I have used the hierarchy function to generate LOB structure that spanned until 15 levels and the data load had passed our quality review.&lt;/P&gt;&lt;P&gt;4. The UI will load data from Hier.qvd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The active resource count should be much lessor than all resources if that can be found then the load will be easy. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 17:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925534#M320307</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2015-09-24T17:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create hierarchy using only 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925535#M320308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yea the 3.5 was from the extended leaves.&amp;nbsp; I was able to address the issue by loading the data from a QVD and then performing a resident load prior to building out the hierarchy.&amp;nbsp; Everything looks good.&amp;nbsp; Thanks for all of the help.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Oct 2015 11:25:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-to-create-hierarchy-using-only-2-fields/m-p/925535#M320308</guid>
      <dc:creator />
      <dc:date>2015-10-01T11:25:44Z</dc:date>
    </item>
  </channel>
</rss>

