<?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 Parent-Child Hierarchy in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1273641#M25081</link>
    <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a calculated column like this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR x =  
CALCULATE(
    MAX(Sheet3[ Name Manager]),
    FILTER(
        Sheet3,
        Sheet3[ID] = EARLIER(Sheet3[ID]) + 1 &amp;amp;&amp;amp; MOD( EARLIER(Sheet3[ID]), 2 ) &amp;lt;&amp;gt; 0
    )
)
VAR y = 
IF(
    x = BLANK(),
    " ", x
)
RETURN
IF(
    CONTAINSSTRING(Sheet3[ Name Manager],y),
    Sheet3[ID]+1, BLANK()
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="v-lionel-msft_0-1596614227289.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/326597i701DAC25D9DD0E11/image-size/medium?v=v2&amp;amp;px=400" role="button" title="v-lionel-msft_0-1596614227289.png" alt="v-lionel-msft_0-1596614227289.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Aug 2020 07:57:17 GMT</pubDate>
    <dc:creator>v-lionel-msft</dc:creator>
    <dc:date>2020-08-05T07:57:17Z</dc:date>
    <item>
      <title>Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1272138#M25065</link>
      <description>&lt;P&gt;I have a data set that looks like the following:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Adam&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want there to be another column called 'Manager ID' that obtains the ID of each person's manager from the ID column. Desired result:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;ManagerID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Adam&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I'm not sure how to achieve this. Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 15:38:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1272138#M25065</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-04T15:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1272196#M25066</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp; - You can use LOOKUPVALUE for that. Or follow the Lookup Min/Max pattern.&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, if you create a concatenated column with a | character between then you could just use PATH&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/path-function-dax" target="_blank"&gt;https://docs.microsoft.com/en-us/dax/path-function-dax&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 16:13:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1272196#M25066</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-04T16:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1273641#M25081</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a calculated column like this.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR x =  
CALCULATE(
    MAX(Sheet3[ Name Manager]),
    FILTER(
        Sheet3,
        Sheet3[ID] = EARLIER(Sheet3[ID]) + 1 &amp;amp;&amp;amp; MOD( EARLIER(Sheet3[ID]), 2 ) &amp;lt;&amp;gt; 0
    )
)
VAR y = 
IF(
    x = BLANK(),
    " ", x
)
RETURN
IF(
    CONTAINSSTRING(Sheet3[ Name Manager],y),
    Sheet3[ID]+1, BLANK()
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="v-lionel-msft_0-1596614227289.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/326597i701DAC25D9DD0E11/image-size/medium?v=v2&amp;amp;px=400" role="button" title="v-lionel-msft_0-1596614227289.png" alt="v-lionel-msft_0-1596614227289.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 07:57:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1273641#M25081</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2020-08-05T07:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1273742#M25082</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/313"&gt;@Greg_Deckler&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried LOOKUPVALUE but that doesn't seem to achieve what I required - unless I am using it incorrectly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In terms of the concentrated column, would that be ID|Display Name to use PATH to pull the ID of each person's manager?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 08:29:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1273742#M25082</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-05T08:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1273750#M25083</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/184579"&gt;@v-lionel-msft&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure if your solution is applicable as I believe you have misunderstood my table (which isn't clear to be fair!) as Name and Manager are separate columns:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;Manager ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Adam&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I have entered in red in the desired result I need to achieve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 08:32:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1273750#M25083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-05T08:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1274301#M25085</link>
      <description>&lt;P&gt;Hi @Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please do like this.&lt;/P&gt;
&lt;P&gt;Create two calculated columns.&lt;/P&gt;
&lt;P&gt;(You can also combine these two formulas.)&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;__Manager = 
IF(
    [Manager] = BLANK(), 
    [Name], [Manager]
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Column = 
VAR x = 
CALCULATE(
    MAX(Sheet4[ID]),
    FILTER(
        Sheet4,
        Sheet4[__Manager] = EARLIER(Sheet4[__Manager]) &amp;amp;&amp;amp; Sheet4[Manager] = BLANK()
    )
)
RETURN
IF(
    [Manager] = BLANK(),
    BLANK(), x
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="v-lionel-msft_0-1596625552268.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/326793i32FF09F237EEEA4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="v-lionel-msft_0-1596625552268.png" alt="v-lionel-msft_0-1596625552268.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 11:06:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1274301#M25085</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2020-08-05T11:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1274487#M25086</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/184579"&gt;@v-lionel-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me. I don't need that additonal '___ Manager' column and due to that, the formula doesn't work. Any gaps where someone is the top of the hierarchy will be like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Name&lt;/TD&gt;&lt;TD&gt;Manager&lt;/TD&gt;&lt;TD&gt;Manager ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Adam&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;2&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I can't seem to get your second calculated column to work. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 12:01:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1274487#M25086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-05T12:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1286172#M25168</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may use Power Query for such scenarios,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Refer to the following article for more details:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.vivran.in/post/power-query-quickbytes-1-self-join" target="_blank"&gt;https://www.vivran.in/post/power-query-quickbytes-1-self-join&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;If it helps, please mark it as a solution. Kudos would be a cherry on the top &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)&lt;BR /&gt;&lt;BR /&gt;Blog: &lt;A href="https://www.vivran.in/my-blog" target="_blank"&gt;vivran.in/my-blog&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://twitter.com/imvivran" target="_blank"&gt;Follow on Twitter&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 04:25:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1286172#M25168</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-08-11T04:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Parent-Child Hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1287184#M25175</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;Please refer to my .pbix file.&lt;/P&gt;
&lt;P&gt;I'm not sure if you want calculated column or measure, so both are created.&lt;/P&gt;
&lt;P&gt;In addition, [__Maganer] is a necessary condition for calculation. Although you don't need it, the final result can not be obtained without it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="v-lionel-msft_0-1597142439639.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/330562iFB108CC3B00C731C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="v-lionel-msft_0-1597142439639.png" alt="v-lionel-msft_0-1597142439639.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 10:41:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Creating-a-Parent-Child-Hierarchy/m-p/1287184#M25175</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2020-08-11T10:41:12Z</dc:date>
    </item>
  </channel>
</rss>

