<?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: Creating a Hierarchy of Job Roles that Report to the Same Manager in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Hierarchy-of-Job-Roles-that-Report-to-the-Same/m-p/5135922#M187432</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="393588" data-lia-user-login="DMB90" class="lia-mention lia-mention-user"&gt;DMB90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;To solve this issue, you need to transition your data from a standard parent-child relationship into a &lt;/SPAN&gt;&lt;STRONG&gt;flattened, regular hierarchy&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Right now, your decomposition tree is organizing people based on their "depth" or distance from the top of the chain. If a Manager and a Supervisor both report directly to the Director, the hierarchy considers them both "Level 2" and places them on the same row.&lt;BR /&gt;&lt;SPAN&gt;Tabular models do not natively support parent-child hierarchies with variable depths directly in visuals.&amp;nbsp;To force specific job roles onto specific rows, you must flatten the hierarchy by creating dedicated columns for each possible level. To solve this problem heres the DAX pattern that come in handy for you.&amp;nbsp;&lt;BR /&gt;First, generate a technical column that maps the entire reporting path from the top-level director down to the specific employee using the &lt;STRONG&gt;PATH&lt;/STRONG&gt; function.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;FullPath = PATH ( 'Employee'[EmployeeID], 'Employee'[ManagerID] )&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;I&gt;Note: This will create a text string separated by pipes (e.g., &lt;/I&gt;&lt;I&gt;DirectorID|ManagerID|StaffID&lt;/I&gt;&lt;I&gt;) showing the exact reporting lineage.&lt;/I&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;I&gt;&lt;SPAN class=""&gt;Next, create a separate calculated column for every hierarchical level you want in your org chart (e.g., Level 1 for Directors, Level 2 for Managers, Level 3 for Supervisors). You will use the &lt;/SPAN&gt;&lt;STRONG&gt;PATHITEM&lt;/STRONG&gt;&lt;SPAN class=""&gt; function to extract the ID at that specific level, and &lt;/SPAN&gt;&lt;STRONG&gt;LOOKUPVALUE&lt;/STRONG&gt;&lt;SPAN class=""&gt; to fetch the employee's name.&lt;/SPAN&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;Level1_Director = 
LOOKUPVALUE(
    'Employee'[Name],
    'Employee'[EmployeeID], 
    PATHITEM ( 'Employee'[FullPath], 1, INTEGER ) 
)

Level2_Manager = 
LOOKUPVALUE(
    'Employee'[Name],
    'Employee'[EmployeeID], 
    PATHITEM ( 'Employee'[FullPath], 2, INTEGER ) 
)

Level3_Supervisor = 
LOOKUPVALUE(
    'Employee'[Name],
    'Employee'[EmployeeID], 
    PATHITEM ( 'Employee'[FullPath], 3, INTEGER ) 
)&lt;/PRE&gt;&lt;/DIV&gt;&lt;SPAN class=""&gt;Note:&amp;nbsp;&lt;I&gt;Repeat this for as many levels as you have.&lt;/I&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;I&gt;&lt;SPAN&gt;Because your org chart has a variable depth (for example, a Supervisor reporting directly to a Director skips the Manager level entirely), &lt;/SPAN&gt;&lt;/I&gt;expanding the tree might produce unwanted blank rows for the skipped levels.&amp;nbsp;&lt;SPAN&gt;To hide these empty rows in your visual, you can calculate the true depth of each employee and suppress the visual from drilling down unnecessarily.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;NodeDepth = PATHLENGTH ( 'Employee'[FullPath] )&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;I&gt;This calculates how many levels deep the specific employee is.&lt;/I&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;BrowseDepth = 
ISINSCOPE ( 'Employee'[Level1_Director] ) + 
ISINSCOPE ( 'Employee'[Level2_Manager] ) + 
ISINSCOPE ( 'Employee'[Level3_Supervisor] )&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;I&gt;This uses &lt;/I&gt;&lt;I&gt;ISINSCOPE&lt;/I&gt;&lt;I&gt; to dynamically count how many levels deep the user has expanded the decomposition tree.&lt;/I&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Instead of using a raw headcount or value in your decomposition tree, wrap your metric in an &lt;/SPAN&gt;IF&lt;SPAN class=""&gt; statement that compares the two depths. If the tree is expanded deeper than the employee's actual &lt;/SPAN&gt;NodeDepth&lt;SPAN class=""&gt;, it returns &lt;/SPAN&gt;BLANK()&lt;SPAN class=""&gt;, which hides the row.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;Org Chart Headcount = 
IF (
    MAX ( 'Employee'[NodeDepth] ) &amp;lt; [BrowseDepth],
    BLANK (),
    // Replace with whatever measure you are using for the visual's values
    COUNTROWS('Employee') 
)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class=""&gt;By placing your newly created &lt;/SPAN&gt;Level1&lt;SPAN class=""&gt;, &lt;/SPAN&gt;Level2&lt;SPAN class=""&gt;, and &lt;/SPAN&gt;Level3&lt;SPAN class=""&gt; columns into the decomposition tree in strict order, you force the visual to adhere to your specific levels rather than the raw distance from the Director.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;If this solution solve your problem or able to point you out to use in your case. Plese mark this a solved.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 19 Mar 2026 18:08:16 GMT</pubDate>
    <dc:creator>mizan2390</dc:creator>
    <dc:date>2026-03-19T18:08:16Z</dc:date>
    <item>
      <title>Creating a Hierarchy of Job Roles that Report to the Same Manager</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Hierarchy-of-Job-Roles-that-Report-to-the-Same/m-p/5131870#M187388</link>
      <description>&lt;P&gt;I am creating a vertical org chart and when I get to a director who has direct reports from various job levels, I want to have a decomposition tree with managers only on one row, supervisors only on one row and staff only on one row but have them all connected to the director. Right now, I am getting a manager and supervisor on the same row and that's not how I want the org chart. I created a manager ID to connect people to their supervisor, but can I perhaps create a more dynamic manager ID so that if it's a certain job level,&amp;nbsp; they are on a specific level?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2026 17:32:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Hierarchy-of-Job-Roles-that-Report-to-the-Same/m-p/5131870#M187388</guid>
      <dc:creator>DMB90</dc:creator>
      <dc:date>2026-03-13T17:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Hierarchy of Job Roles that Report to the Same Manager</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Hierarchy-of-Job-Roles-that-Report-to-the-Same/m-p/5132256#M187391</link>
      <description>&lt;P&gt;So the supervisors are not actually marked as such in your HR hierarchy, and instead are on the same level as employees or managers?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2026 13:27:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Hierarchy-of-Job-Roles-that-Report-to-the-Same/m-p/5132256#M187391</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2026-03-14T13:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Hierarchy of Job Roles that Report to the Same Manager</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Hierarchy-of-Job-Roles-that-Report-to-the-Same/m-p/5135922#M187432</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="393588" data-lia-user-login="DMB90" class="lia-mention lia-mention-user"&gt;DMB90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;To solve this issue, you need to transition your data from a standard parent-child relationship into a &lt;/SPAN&gt;&lt;STRONG&gt;flattened, regular hierarchy&lt;/STRONG&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Right now, your decomposition tree is organizing people based on their "depth" or distance from the top of the chain. If a Manager and a Supervisor both report directly to the Director, the hierarchy considers them both "Level 2" and places them on the same row.&lt;BR /&gt;&lt;SPAN&gt;Tabular models do not natively support parent-child hierarchies with variable depths directly in visuals.&amp;nbsp;To force specific job roles onto specific rows, you must flatten the hierarchy by creating dedicated columns for each possible level. To solve this problem heres the DAX pattern that come in handy for you.&amp;nbsp;&lt;BR /&gt;First, generate a technical column that maps the entire reporting path from the top-level director down to the specific employee using the &lt;STRONG&gt;PATH&lt;/STRONG&gt; function.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;FullPath = PATH ( 'Employee'[EmployeeID], 'Employee'[ManagerID] )&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;I&gt;Note: This will create a text string separated by pipes (e.g., &lt;/I&gt;&lt;I&gt;DirectorID|ManagerID|StaffID&lt;/I&gt;&lt;I&gt;) showing the exact reporting lineage.&lt;/I&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;I&gt;&lt;SPAN class=""&gt;Next, create a separate calculated column for every hierarchical level you want in your org chart (e.g., Level 1 for Directors, Level 2 for Managers, Level 3 for Supervisors). You will use the &lt;/SPAN&gt;&lt;STRONG&gt;PATHITEM&lt;/STRONG&gt;&lt;SPAN class=""&gt; function to extract the ID at that specific level, and &lt;/SPAN&gt;&lt;STRONG&gt;LOOKUPVALUE&lt;/STRONG&gt;&lt;SPAN class=""&gt; to fetch the employee's name.&lt;/SPAN&gt;&lt;/I&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;Level1_Director = 
LOOKUPVALUE(
    'Employee'[Name],
    'Employee'[EmployeeID], 
    PATHITEM ( 'Employee'[FullPath], 1, INTEGER ) 
)

Level2_Manager = 
LOOKUPVALUE(
    'Employee'[Name],
    'Employee'[EmployeeID], 
    PATHITEM ( 'Employee'[FullPath], 2, INTEGER ) 
)

Level3_Supervisor = 
LOOKUPVALUE(
    'Employee'[Name],
    'Employee'[EmployeeID], 
    PATHITEM ( 'Employee'[FullPath], 3, INTEGER ) 
)&lt;/PRE&gt;&lt;/DIV&gt;&lt;SPAN class=""&gt;Note:&amp;nbsp;&lt;I&gt;Repeat this for as many levels as you have.&lt;/I&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;I&gt;&lt;SPAN&gt;Because your org chart has a variable depth (for example, a Supervisor reporting directly to a Director skips the Manager level entirely), &lt;/SPAN&gt;&lt;/I&gt;expanding the tree might produce unwanted blank rows for the skipped levels.&amp;nbsp;&lt;SPAN&gt;To hide these empty rows in your visual, you can calculate the true depth of each employee and suppress the visual from drilling down unnecessarily.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;NodeDepth = PATHLENGTH ( 'Employee'[FullPath] )&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;I&gt;This calculates how many levels deep the specific employee is.&lt;/I&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;BrowseDepth = 
ISINSCOPE ( 'Employee'[Level1_Director] ) + 
ISINSCOPE ( 'Employee'[Level2_Manager] ) + 
ISINSCOPE ( 'Employee'[Level3_Supervisor] )&lt;/PRE&gt;&lt;DIV class=""&gt;&lt;I&gt;This uses &lt;/I&gt;&lt;I&gt;ISINSCOPE&lt;/I&gt;&lt;I&gt; to dynamically count how many levels deep the user has expanded the decomposition tree.&lt;/I&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Instead of using a raw headcount or value in your decomposition tree, wrap your metric in an &lt;/SPAN&gt;IF&lt;SPAN class=""&gt; statement that compares the two depths. If the tree is expanded deeper than the employee's actual &lt;/SPAN&gt;NodeDepth&lt;SPAN class=""&gt;, it returns &lt;/SPAN&gt;BLANK()&lt;SPAN class=""&gt;, which hides the row.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;PRE&gt;Org Chart Headcount = 
IF (
    MAX ( 'Employee'[NodeDepth] ) &amp;lt; [BrowseDepth],
    BLANK (),
    // Replace with whatever measure you are using for the visual's values
    COUNTROWS('Employee') 
)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class=""&gt;By placing your newly created &lt;/SPAN&gt;Level1&lt;SPAN class=""&gt;, &lt;/SPAN&gt;Level2&lt;SPAN class=""&gt;, and &lt;/SPAN&gt;Level3&lt;SPAN class=""&gt; columns into the decomposition tree in strict order, you force the visual to adhere to your specific levels rather than the raw distance from the Director.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;If this solution solve your problem or able to point you out to use in your case. Plese mark this a solved.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Mar 2026 18:08:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-a-Hierarchy-of-Job-Roles-that-Report-to-the-Same/m-p/5135922#M187432</guid>
      <dc:creator>mizan2390</dc:creator>
      <dc:date>2026-03-19T18:08:16Z</dc:date>
    </item>
  </channel>
</rss>

