<?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: Summing up direct reports in a hierarchy in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Summing-up-direct-reports-in-a-hierarchy/m-p/759376#M270213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An idea from &lt;A href="http://youtu.be/ywz8WNitL1k" title="http://youtu.be/ywz8WNitL1k"&gt;Qlikview - Hierarchy vs Hierarchy belongs to - YouTube&lt;/A&gt; Used hierarchy belongs to and created a table of 'managers' in the script so QlikView could count each occurrence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp; NumID,NumName,NumManagerID&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1, George, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2, Sally,1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 3, Frank,1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 4, John,3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 5, Mary,3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 6, Errol,2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Table with entries each time an EmployeeID occurs as a manager.&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Count:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; NumManagerID as EmployeeID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1 as MngrCount&lt;/P&gt;&lt;P&gt;Resident Num;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For directs and below I use made empFlag column for each employee and a straight table with: Sum (empFlag).&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80280_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I've attached the sample - you can also use that sample as scratch when watching: &lt;A href="http://youtu.be/ywz8WNitL1k" title="http://youtu.be/ywz8WNitL1k"&gt;Qlikview - Hierarchy vs Hierarchy belongs to - YouTube&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2015 19:10:47 GMT</pubDate>
    <dc:creator>Daniel_Moore</dc:creator>
    <dc:date>2015-03-09T19:10:47Z</dc:date>
    <item>
      <title>Summing up direct reports in a hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Summing-up-direct-reports-in-a-hierarchy/m-p/759375#M270212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working on an orgchart and I'm trying to add up the direct reports for each 'node' and all the "direct reports and below" for each node. &lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80183_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I've played around a bit with the script but no luck. Any ideas? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Testing:&lt;BR /&gt; HierarchyBelongsTo:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;HierarchyBelongsTo&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;nodeAncestor&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;parentAncestor&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;NodeName&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;, ParentId, AncestorName, DepthDiff)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Node&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;nodeAncestor&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Node&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;NodeName&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;ParentId&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;parentAncestor&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; Nodes;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Mar 2015 18:21:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Summing-up-direct-reports-in-a-hierarchy/m-p/759375#M270212</guid>
      <dc:creator>Daniel_Moore</dc:creator>
      <dc:date>2015-03-06T18:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Summing up direct reports in a hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Summing-up-direct-reports-in-a-hierarchy/m-p/759376#M270213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An idea from &lt;A href="http://youtu.be/ywz8WNitL1k" title="http://youtu.be/ywz8WNitL1k"&gt;Qlikview - Hierarchy vs Hierarchy belongs to - YouTube&lt;/A&gt; Used hierarchy belongs to and created a table of 'managers' in the script so QlikView could count each occurrence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp; NumID,NumName,NumManagerID&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1, George, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2, Sally,1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 3, Frank,1&lt;/P&gt;&lt;P&gt;&amp;nbsp; 4, John,3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 5, Mary,3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 6, Errol,2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Table with entries each time an EmployeeID occurs as a manager.&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Count:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; NumManagerID as EmployeeID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; 1 as MngrCount&lt;/P&gt;&lt;P&gt;Resident Num;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For directs and below I use made empFlag column for each employee and a straight table with: Sum (empFlag).&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80280_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;I've attached the sample - you can also use that sample as scratch when watching: &lt;A href="http://youtu.be/ywz8WNitL1k" title="http://youtu.be/ywz8WNitL1k"&gt;Qlikview - Hierarchy vs Hierarchy belongs to - YouTube&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 19:10:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Summing-up-direct-reports-in-a-hierarchy/m-p/759376#M270213</guid>
      <dc:creator>Daniel_Moore</dc:creator>
      <dc:date>2015-03-09T19:10:47Z</dc:date>
    </item>
  </channel>
</rss>

