<?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: Can we create hierarchy level loop in Qlik Sense in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1638025#M47564</link>
    <description>&lt;P&gt;You need append the previous script. I only added Dataset table.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 19:38:03 GMT</pubDate>
    <dc:creator>jerifortune</dc:creator>
    <dc:date>2019-10-21T19:38:03Z</dc:date>
    <item>
      <title>Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632191#M47069</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I have a csv file that has following information:&lt;/P&gt;&lt;P&gt;emp id, emp name, manager id&lt;/P&gt;&lt;P&gt;1, A, -&lt;/P&gt;&lt;P&gt;2, B, A&lt;/P&gt;&lt;P&gt;3, C, B&lt;/P&gt;&lt;P&gt;4, D, C&lt;/P&gt;&lt;P&gt;I understand that using hierarchy I can create depth&amp;nbsp;&lt;/P&gt;&lt;P&gt;emp id, emp name, manager id, Path Name, depth&lt;/P&gt;&lt;P&gt;1, A, -, A, 1&lt;/P&gt;&lt;P&gt;2, B, A,A/B, 2&lt;/P&gt;&lt;P&gt;3, C, B, A/B/C, 3&lt;/P&gt;&lt;P&gt;4, D, C, A/B/C/D, 4&lt;/P&gt;&lt;P&gt;I need a filter condition where if I select emp- A and level as 1, I should only get B&lt;/P&gt;&lt;P&gt;If I select emp-A and level 2, I should get B and C&lt;/P&gt;&lt;P&gt;If I select emp B and level 3, I should get B, C and D&lt;/P&gt;&lt;P&gt;Any idea how can I implement this?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:56:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632191#M47069</guid>
      <dc:creator>PoojaPrasad</dc:creator>
      <dc:date>2024-11-16T19:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632204#M47071</link>
      <description>&lt;P&gt;Not sure what you are trying to achieve but hierarchy level allows you to see&amp;nbsp; employee BCD when you select Level 2,&amp;nbsp; CD when you select Level 3, and D when you select Level 4.&lt;/P&gt;&lt;P&gt;Level 1 can give you Employee ABCD.&amp;nbsp; However, you can write a script to adjust this behavour&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 20:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632204#M47071</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2019-10-07T20:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632205#M47072</link>
      <description>&lt;P&gt;maybe you need something like this&amp;nbsp; and then you can play with it(create crosstable etc) depending on how you want to create filters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PRE:&lt;BR /&gt;Hierarchy(NodeID, ParentID, NodeName, ParentName, NodeName, PathName, '\', Depth) LOAD * inline [&lt;BR /&gt;NodeID,NodeName,ParentID&lt;BR /&gt;1, A,''&lt;BR /&gt;2, B,1&lt;BR /&gt;3, C,2&lt;BR /&gt;4, D,3&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;POST:&lt;BR /&gt;Load if(not isnull(NodeName4),NodeName1) as Level4&lt;BR /&gt;, if(not isnull(NodeName4),NodeName2,if(not isnull(NodeName3),NodeName1)) as Level3,&lt;BR /&gt;if(not isnull(NodeName4),NodeName3,if(not isnull(NodeName3),NodeName2,if(not isnull(NodeName2),NodeName1))) as Level2 ,NodeName as Emp Resident PRE;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Drop table PRE;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 20:28:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632205#M47072</guid>
      <dc:creator>asinha1991</dc:creator>
      <dc:date>2019-10-07T20:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632208#M47073</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Sometimes i find it easier to build in a csv table that I load.&lt;/P&gt;&lt;P&gt;I have one table that is "Current Alignment" and then another that is "Historical Alignment"&lt;/P&gt;&lt;P&gt;This way I can look at data, like financials,&amp;nbsp; based on current set of stores that a person is responsible for or look back at their Historical data.&lt;/P&gt;&lt;P&gt;I use the following:&lt;/P&gt;&lt;P&gt;VPO&lt;/P&gt;&lt;P&gt;RDO&lt;/P&gt;&lt;P&gt;DM&lt;/P&gt;&lt;P&gt;GM&lt;/P&gt;&lt;P&gt;and then each is broke out by the financial period ( time frame ) that they were responsible for&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 20:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632208#M47073</guid>
      <dc:creator>Roadrunner</dc:creator>
      <dc:date>2019-10-07T20:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632214#M47074</link>
      <description>&lt;P&gt;I am trying to implement filter as shown below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="hierarchy_requirement.png" style="width: 444px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/20843iB680A330B24A2629/image-size/large?v=v2&amp;amp;px=999" role="button" title="hierarchy_requirement.png" alt="hierarchy_requirement.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a particular emp_id is selected and level is selected, I should get all employees who report directly, 2 below, 3 below and so on to Emp_ID&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 21:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632214#M47074</guid>
      <dc:creator>PoojaPrasad</dc:creator>
      <dc:date>2019-10-07T21:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632222#M47075</link>
      <description>&lt;P&gt;Here is a example of what I was talking about&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/20848i7CCCE5C956B4C67E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 21:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632222#M47075</guid>
      <dc:creator>Roadrunner</dc:creator>
      <dc:date>2019-10-07T21:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632649#M47116</link>
      <description>&lt;P&gt;This will give you the Managers under each employee. After executing the script, create a&amp;nbsp; a table chart with Empid and LineManagers.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Hiertest:&lt;BR /&gt;Hierarchy&lt;BR /&gt;(empid, managerid, empname, Manager, empname , Employee_Hierarchy,,[Depth])&lt;BR /&gt;Load&lt;BR /&gt;empid, managerid, empname&lt;BR /&gt;;&lt;BR /&gt;LOAd * Inline [&lt;BR /&gt;empid, empname, managerid&lt;/P&gt;&lt;P&gt;1, A, -&lt;/P&gt;&lt;P&gt;2, B, 1&lt;/P&gt;&lt;P&gt;3, C, 2&lt;/P&gt;&lt;P&gt;4, D, 3&lt;BR /&gt;]&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;tempMaxLevel:&lt;BR /&gt;LOAD MAX(Depth) AS #ofEmpLevel Resident Hiertest;&lt;BR /&gt;Let vNofEmpLevel= Peek('#ofEmpLevel',0,'tempMaxLevel');&lt;/P&gt;&lt;P&gt;FOR i=1 to $(vNofEmpLevel)&lt;BR /&gt;NewEmployeeTbl:&lt;BR /&gt;LOAD empid, empname$(i) AS LineManagers&lt;BR /&gt;Resident Hiertest&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;NEXT;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Temp_data:&lt;BR /&gt;Load * Resident NewEmployeeTbl;&lt;BR /&gt;Left Join (Temp_data)&lt;/P&gt;&lt;P&gt;Load empid, empname Resident Hiertest;&lt;/P&gt;&lt;P&gt;Drop table NewEmployeeTbl;&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Data:&lt;BR /&gt;Load empid,LineManagers Resident Temp_data&lt;BR /&gt;Where empname &amp;lt;&amp;gt; LineManagers&lt;BR /&gt;;&lt;BR /&gt;Drop Table Temp_data;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 16:34:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1632649#M47116</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2019-10-08T16:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1637312#M47498</link>
      <description>&lt;P&gt;Hello Jerifortune,&lt;/P&gt;&lt;P&gt;It took me a while to implement the same on my real data set but your code does give me Line Managers and all his/her levels in Depth. I do not have in depth knowledge of coding on Qlik and but your code gave an idea on how easily we can implement queries using functions in qlik. Thank you so much.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 16:46:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1637312#M47498</guid>
      <dc:creator>PoojaPrasad</dc:creator>
      <dc:date>2019-10-18T16:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1637328#M47500</link>
      <description>&lt;P&gt;Hi PoojaPrasad,&lt;BR /&gt;&lt;BR /&gt;I am glad this helped.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the feedback.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 17:33:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1637328#M47500</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2019-10-18T17:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1637965#M47559</link>
      <description>&lt;P&gt;Hello Jerifortune,&lt;/P&gt;&lt;P&gt;I have one quick question. Is it possible to customize the display value of the depth corresponding to line managers? Say if a line manager at depth 3 is selected, then under his hierarchy - depth 4 should be shown as direct report, 5 as 2 level below, 6 as 3 level below and so on. This should happen for every selected line managers as per the depth he/she resides.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 16:41:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1637965#M47559</guid>
      <dc:creator>PoojaPrasad</dc:creator>
      <dc:date>2019-10-21T16:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1638016#M47562</link>
      <description>&lt;P&gt;Not really sure what you are trying to achieve, but this should guide you&lt;/P&gt;&lt;P&gt;Adjust your script to include&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FOR i=1 to $(vNofEmpLevel)&lt;BR /&gt;NewEmployeeTbl:&lt;BR /&gt;LOAD empid, empname$(i) AS LineManagers, $&lt;STRONG&gt;(1) AS Level&lt;/STRONG&gt;&lt;BR /&gt;Resident Hiertest&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;NEXT;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Data:&lt;BR /&gt;Load empid,LineManagers, Level&amp;nbsp; Resident Temp_data&lt;BR /&gt;Where empname &amp;lt;&amp;gt; LineManagers&amp;nbsp;AND Len(LineManagers) &amp;gt;0&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Data)&lt;BR /&gt;LOAD Max(Level) AS maxLevel,&lt;BR /&gt;empid&lt;BR /&gt;Resident Data&lt;BR /&gt;GROUP BY empid&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dataset:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD empid,LineManagers,IF(flag=0, 'Direct Report', flag &amp;amp; ' Level Below') AS Desc&lt;BR /&gt;;&lt;BR /&gt;LOAD empid,LineManagers, num(maxLevel)-num(Level) As flag&lt;BR /&gt;Resident Data ;&lt;BR /&gt;&lt;BR /&gt;Drop Table Data:&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 19:17:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1638016#M47562</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2019-10-21T19:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1638025#M47564</link>
      <description>&lt;P&gt;You need append the previous script. I only added Dataset table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 19:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1638025#M47564</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2019-10-21T19:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1645596#M48130</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/18875"&gt;@jerifortune&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I copied the code given above:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[Hierarchy]:&lt;BR /&gt;Noconcatenate&lt;BR /&gt;Hierarchy(NodeID, ParentID, NodeName, ParentName, NodeName, PathName, '\', Depth)&lt;BR /&gt;LOAD&lt;BR /&gt;num(EmployeeID) as NodeID,&lt;BR /&gt;if([CustomMgrID] = '-', '',CustomMgrID) as ParentID,&lt;BR /&gt;Fullname as NodeName&lt;BR /&gt;Resident Customer_Managers_withID;&lt;/P&gt;&lt;P&gt;tempMaxLevel:&lt;BR /&gt;LOAD MAX(Depth) AS #ofEmpLevel Resident Hierarchy;&lt;BR /&gt;Let vNofEmpLevel= Peek('#ofEmpLevel',0,'tempMaxLevel');&lt;/P&gt;&lt;P&gt;FOR i=1 to $(vNofEmpLevel)&lt;BR /&gt;NewEmployeeTbl:&lt;BR /&gt;LOAD NodeID, NodeName$(i) AS LineManagers , $(1) AS Level&lt;BR /&gt;Resident Hierarchy;&lt;BR /&gt;//Resident Hiertest;&lt;BR /&gt;&lt;BR /&gt;NEXT;&lt;BR /&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Temp_data:&lt;BR /&gt;Load * Resident NewEmployeeTbl;&lt;BR /&gt;Left Join (Temp_data)&lt;/P&gt;&lt;P&gt;Load NodeID, NodeName Resident Hierarchy;&lt;/P&gt;&lt;P&gt;Drop table NewEmployeeTbl;&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Data:&lt;BR /&gt;Load NodeID,LineManagers Resident Temp_data&lt;BR /&gt;Where NodeName &amp;lt;&amp;gt; LineManagers AND Len(LineManagers) &amp;gt;0&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Data)&lt;BR /&gt;LOAD Max(Level) AS maxLevel,&lt;BR /&gt;NodeID&lt;BR /&gt;Resident Data&lt;BR /&gt;GROUP BY NodeID&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Dataset:&lt;/P&gt;&lt;P&gt;LOAD NodeID,LineManagers,IF(flag=0, 'Direct Report', flag &amp;amp; ' Level Below') AS Desc&lt;BR /&gt;;&lt;BR /&gt;LOAD NodeID,LineManagers, num(maxLevel)-num(Level) As flag&lt;BR /&gt;Resident Data ;&lt;BR /&gt;Drop Table Data;&lt;/P&gt;&lt;P&gt;Drop Table Temp_data;&lt;BR /&gt;//Drop table [Customer_Managers_withID];&lt;BR /&gt;exit script;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am getting the error as below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hierarchy_error.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/23409i25B6841A4B6B8CBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="hierarchy_error.PNG" alt="hierarchy_error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Honestly speaking I did not understand the code completely so not able to fix the error.&lt;/P&gt;&lt;P&gt;My use case is: Two columns in filter: Line_Manager &amp;amp; Levels_Below&lt;/P&gt;&lt;P&gt;So, if an employee in&amp;nbsp; Line_Manager is selected (say he/she is on depth 3), the column Levels_Below should show depth 4 under him as Direct Reportee, 5 as Level 1 and 6 as Level 3 and so on.&lt;/P&gt;&lt;P&gt;If an employee in&amp;nbsp; Line_Manager is selected (say he/she is on depth 4), the column Levels_Below should show depth&amp;nbsp; 5 under him as Direct Reportee, 6 as Level 1 and 7 as Level 3 and so on.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 22:51:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1645596#M48130</guid>
      <dc:creator>PoojaPrasad</dc:creator>
      <dc:date>2019-11-11T22:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can we create hierarchy level loop in Qlik Sense</title>
      <link>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1645979#M48155</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hiertest:&lt;BR /&gt;Hierarchy&lt;BR /&gt;(empid, managerid, empname, Manager, empname , Employee_Hierarchy,,[Depth])&lt;BR /&gt;Load&lt;BR /&gt;empid, managerid, empname&lt;BR /&gt;;&lt;BR /&gt;LOAd * Inline [&lt;BR /&gt;empid, empname, managerid&lt;/P&gt;&lt;P&gt;1, A, -&lt;/P&gt;&lt;P&gt;2, B, 1&lt;/P&gt;&lt;P&gt;3, C, 2&lt;/P&gt;&lt;P&gt;4, D, 3&lt;BR /&gt;]&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;tempMaxLevel:&lt;BR /&gt;LOAD MAX(Depth) AS #ofEmpLevel Resident Hiertest;&lt;BR /&gt;Let vNofEmpLevel= Peek('#ofEmpLevel',0,'tempMaxLevel');&lt;/P&gt;&lt;P&gt;FOR i=1 to $(vNofEmpLevel)&lt;BR /&gt;NewEmployeeTbl:&lt;BR /&gt;LOAD empid, empname$(i) AS LineManagers, $(i) AS Level&lt;BR /&gt;Resident Hiertest&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;NEXT;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Temp_data:&lt;BR /&gt;Load * Resident NewEmployeeTbl;&lt;BR /&gt;Left Join (Temp_data)&lt;/P&gt;&lt;P&gt;Load empid, empname Resident Hiertest;&lt;/P&gt;&lt;P&gt;Drop table NewEmployeeTbl;&lt;BR /&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;tempData:&lt;/P&gt;&lt;P&gt;Load empid,LineManagers, Level Resident Temp_data&lt;BR /&gt;Where empname &amp;lt;&amp;gt; LineManagers AND Len(LineManagers) &amp;gt;0&lt;BR /&gt;;&lt;BR /&gt;LEFT JOIN (tempData)&lt;BR /&gt;LOAD Max(Level) AS maxLevel,&lt;BR /&gt;empid&lt;BR /&gt;Resident tempData&lt;BR /&gt;GROUP BY empid&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data:&lt;BR /&gt;LOAD empid,LineManagers,IF(flag=0, 'Direct Report', flag &amp;amp; ' Level Below') AS Desc&lt;BR /&gt;;&lt;BR /&gt;LOAD empid,LineManagers, num(maxLevel)-num(Level) As flag&lt;BR /&gt;Resident tempData ;&lt;/P&gt;&lt;P&gt;Drop Table Temp_data, tempData;&lt;/P&gt;&lt;P&gt;Drop table Hiertest;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2019 15:57:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Can-we-create-hierarchy-level-loop-in-Qlik-Sense/m-p/1645979#M48155</guid>
      <dc:creator>jerifortune</dc:creator>
      <dc:date>2019-11-12T15:57:25Z</dc:date>
    </item>
  </channel>
</rss>

