<?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: Direct Report to Leader and indirect report to Leader counts in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1050828#M14375</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225658" data-lia-user-login="vsk7775" class="lia-mention lia-mention-user"&gt;vsk7775&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the number of direct reports,&amp;nbsp; youcan create the number a calclated column in yout table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Direct Reports = 
0 + CALCULATE(COUNT(Table1[EmployeeTitle]); Table1[LeaderID] = EARLIER(Table1[EmployeeID ]);ALL(Table1))&lt;/LI-CODE&gt;
&lt;P&gt;For the number of indirect reports,&amp;nbsp; I don't quite understand why the expected result is 7 for employeeID 2. Can you explain who exactly&amp;nbsp; would be considered an indirect report?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2020 12:48:15 GMT</pubDate>
    <dc:creator>AlB</dc:creator>
    <dc:date>2020-04-27T12:48:15Z</dc:date>
    <item>
      <title>Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1050745#M14370</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to findout Direct Reporting leader and indirect report to the leader for the below dataset. I tried different DAX expression but i didn't get the right result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;EmployeeID&amp;nbsp;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;LeaderID&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;EmployeeTitle&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;CEO&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;VP&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;VP&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;4&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Manager1&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Manager2&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;6&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;3&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Manager3&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;7&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;4&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Security engineer&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;8&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Developer&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;9&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;4&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Analyst&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;10&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;6&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Developer II&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;11&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;5&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Developer II&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT size="2"&gt;12&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;8&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT size="2"&gt;Manager4&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;When I looked for direct employee count for leaderID&amp;nbsp; 2 by using the below DAX expression it is giving me the result as 5 but actually in the data set if we see it is only two people who directly report to employeeID 2 they are ( employeeid 3 and 4)&lt;/P&gt;&lt;P&gt;Also for indirect employee count for leaderID 2 i am getting the count as 12 but actually we have only 7 indirect employee's&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Here are my queries which i used to create measures.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Direct Count:=
VAR level1 =
INTERSECT ( ALL ( [Employee ID] ), VALUES ( [Leader ID] ))
RETURN
CALCULATE ( COUNT ( 'Employee ID] ), ( level1))



Indirect Count:=
VAR level1 =
INTERSECT ( ALL ( [Leader ID] ), VALUES ( [Employee ID] ))
VAR level2 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level1)
)
VAR level3 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level2)
)
VAR level4 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level3)
)
VAR level5 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level4)
)
VAR level6 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level5)
)
VAR level7 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level6)
)
VAR level8 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level7)
)
VAR level9 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level8)
)
VAR level10 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level9)
)
VAR level11 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level10)
)
VAR level12 =
INTERSECT (
ALL ([Leader ID]),
CALCULATETABLE ( VALUES ( [Employee ID]), level11)
)
RETURN
CALCULATE ( DISTINCTCOUNT ( [Employee ID] ), UNION ( level1, level2, level3, level4, level5, level6, level7, level8, level9, level10, level11, level12 ) )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 12:07:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1050745#M14370</guid>
      <dc:creator>vsk7775</dc:creator>
      <dc:date>2020-04-27T12:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1050828#M14375</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225658" data-lia-user-login="vsk7775" class="lia-mention lia-mention-user"&gt;vsk7775&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the number of direct reports,&amp;nbsp; youcan create the number a calclated column in yout table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Direct Reports = 
0 + CALCULATE(COUNT(Table1[EmployeeTitle]); Table1[LeaderID] = EARLIER(Table1[EmployeeID ]);ALL(Table1))&lt;/LI-CODE&gt;
&lt;P&gt;For the number of indirect reports,&amp;nbsp; I don't quite understand why the expected result is 7 for employeeID 2. Can you explain who exactly&amp;nbsp; would be considered an indirect report?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 12:48:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1050828#M14375</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-04-27T12:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1050975#M14379</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92178" data-lia-user-login="AlB" class="lia-mention lia-mention-user"&gt;AlB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EmployeeID 2 Direct Reports are EmployeeID 3 and 4.&lt;BR /&gt;EmployeeID 2 InDirect Reports are EmployeeID 5,6,7,8,9,10,11&lt;/P&gt;&lt;P&gt;Because&lt;BR /&gt;EmployeeID 5,6 Directly report to 3&lt;BR /&gt;EmployeeID 7,9 directly reports to 4&lt;BR /&gt;EmployeeID 8,11 Directly reports to 5&lt;BR /&gt;EmplyeeID 10 directly reports to 6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create measures not calculated fields/ columns because using these measures if I drill down in excel or power bi I should see their details.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 14:00:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1050975#M14379</guid>
      <dc:creator>vsk7775</dc:creator>
      <dc:date>2020-04-27T14:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051160#M14384</link>
      <description>You are NOT doing it right. Please start with these:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/tv/hierarchies-in-dax/" target="_blank"&gt;https://www.sqlbi.com/tv/hierarchies-in-dax/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.daxpatterns.com/parent-child-hierarchies/" target="_blank"&gt;https://www.daxpatterns.com/parent-child-hierarchies/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://simplebiinsights.com/parent-child-hierarchies-in-dax/" target="_blank"&gt;https://simplebiinsights.com/parent-child-hierarchies-in-dax/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Don't do what you do above. Do not shoot yourself in the foot.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Mon, 27 Apr 2020 14:26:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051160#M14384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-27T14:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051364#M14392</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the link. I have already created my organization chart hierarchy in a similar way and I have a simple measure count(employee ID) but now what i was looking for is how to get the direct team member and indirect team member counts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 15:33:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051364#M14392</guid>
      <dc:creator>vsk7775</dc:creator>
      <dc:date>2020-04-27T15:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051435#M14397</link>
      <description>Well, always remember that you can pivot a table and store two versions in your model - one with the structure across columns, another with the structure across rows - and calculate your measures on the one which is more suitable for the task at hand.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Mon, 27 Apr 2020 15:56:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051435#M14397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-27T15:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051838#M14405</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225658" data-lia-user-login="vsk7775" class="lia-mention lia-mention-user"&gt;vsk7775&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this file:&amp;nbsp;&lt;A title="PBIX" href="https://drive.google.com/file/d/1fQ3mdNKs73pn9S9oV9QjmdnYuURDJgvG/view?usp=sharing" target="_blank" rel="noopener"&gt;Download PBIX&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I got the employee_id 12 as indirect for leader 2, is it correct ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 20:06:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051838#M14405</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-04-27T20:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051894#M14408</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="215853" data-lia-user-login="camargos88" class="lia-mention lia-mention-user"&gt;camargos88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for looking into it. I am unable to open the file do you mind sharing the measure for both direct and indirect so that i will check from my end.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 20:37:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051894#M14408</guid>
      <dc:creator>vsk7775</dc:creator>
      <dc:date>2020-04-27T20:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051926#M14411</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225658" data-lia-user-login="vsk7775" class="lia-mention lia-mention-user"&gt;vsk7775&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create these 2 calculated columns:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Path = PATH('Table'[EmployeeID ]; 'Table'[LeaderID])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Length = PATHLENGTH('Table'[Path])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and these 3 measures:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_Direct Report = CALCULATE(COUNT('Table'[EmployeeID ]); FILTER(ALL('Table'); 'Table'[LeaderID] = SELECTEDVALUE('Table'[EmployeeID ]))) + 0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_Indirect Report = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _employeeID = SELECTEDVALUE('Table'[EmployeeID ])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR _length = CALCULATE(DISTINCT('Table'[Length]); FILTER(ALL('Table'); 'Table'[EmployeeID ] = _employeeID))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE(DISTINCTCOUNT('Table'[EmployeeID ]);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER(ALL('Table'); PATHCONTAINS(PATH('Table'[EmployeeID ]; 'Table'[LeaderID]); _employeeID) &amp;amp;&amp;amp; PATHLENGTH(PATH('Table'[EmployeeID ]; 'Table'[LeaderID])) &amp;gt; _length + 1)) + 0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_Total Report = [_Direct Report] + [_Indirect Report]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ricardo&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 20:50:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1051926#M14411</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-04-27T20:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1052000#M14414</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="215853" data-lia-user-login="camargos88" class="lia-mention lia-mention-user"&gt;camargos88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your quick response. Not sure why it is not working for my current data set. Thanks a lot for looking into it.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 21:33:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1052000#M14414</guid>
      <dc:creator>vsk7775</dc:creator>
      <dc:date>2020-04-27T21:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Direct Report to Leader and indirect report to Leader counts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1052024#M14415</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225658" data-lia-user-login="vsk7775" class="lia-mention lia-mention-user"&gt;vsk7775&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try downloading the file again:&amp;nbsp;&lt;A title="PBIX" href="https://drive.google.com/file/d/1fQ3mdNKs73pn9S9oV9QjmdnYuURDJgvG/view?usp=sharing" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;Download PBIX&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ricardo&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 21:41:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Direct-Report-to-Leader-and-indirect-report-to-Leader-counts/m-p/1052024#M14415</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-04-27T21:41:24Z</dc:date>
    </item>
  </channel>
</rss>

