<?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: Converting Project WBS to Parent/Child Heirarchy in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Converting-Project-WBS-to-Parent-Child-Heirarchy/m-p/2666671#M79308</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="416514" data-lia-user-login="k-giles" class="lia-mention lia-mention-user"&gt;k-giles&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend you to use SWITCH() instead of IF() .&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;WBS Child = SWITCH(TRUE(),Tasks[WBS.4]&amp;lt;&amp;gt;BLANK(),Tasks[WBS.4],
                          Tasks[WBS.4]=BLANK() &amp;amp;&amp;amp; Tasks[WBS.3]&amp;lt;&amp;gt;BLANK(),Tasks[WBS.3],
                          Tasks[WBS.4]=BLANK() &amp;amp;&amp;amp; Tasks[WBS.3]=BLANK() &amp;amp;&amp;amp; Tasks[WBS.2]&amp;lt;&amp;gt;BLANK(),Tasks[WBS.2])&lt;/LI-CODE&gt;
&lt;P&gt;The result is as shown :&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I have attached my pbix file , you can refer to it .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Ailsa Tao&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2022 07:29:47 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-07-28T07:29:47Z</dc:date>
    <item>
      <title>Converting Project WBS to Parent/Child Heirarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Converting-Project-WBS-to-Parent-Child-Heirarchy/m-p/2658007#M78688</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm looking to build a dax to convert the WBS code column into two columns to show the parent/child heirarchy and build a path. This will then be later on used to develop a gantt chart in PBI and show the tasks in a table in correct heirarchical order.&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;&lt;P&gt;I've split out the wbs structure into 4 columns&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I'm trying to write a dax that will calcualte the child tasks using the following formula:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;WBS Child = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[WBS Level.4]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[WBS Level.3]&lt;/SPAN&gt;&lt;SPAN&gt;,(&lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[WBS Level.3]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;Tasks[WBS Level.2]&lt;/SPAN&gt;&lt;SPAN&gt;,(&lt;/SPAN&gt;&lt;SPAN&gt;Tasks[WBS Level.2]&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However it is only returning the level 4 or 3 value not returning level 2 values or presenting an error so not sure where I've gone wrong or if this is event the right solution to do this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&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;Thanks in advance&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 25 Jul 2022 04:13:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Converting-Project-WBS-to-Parent-Child-Heirarchy/m-p/2658007#M78688</guid>
      <dc:creator>k-giles</dc:creator>
      <dc:date>2022-07-25T04:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Project WBS to Parent/Child Heirarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Converting-Project-WBS-to-Parent-Child-Heirarchy/m-p/2666671#M79308</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="416514" data-lia-user-login="k-giles" class="lia-mention lia-mention-user"&gt;k-giles&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend you to use SWITCH() instead of IF() .&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;WBS Child = SWITCH(TRUE(),Tasks[WBS.4]&amp;lt;&amp;gt;BLANK(),Tasks[WBS.4],
                          Tasks[WBS.4]=BLANK() &amp;amp;&amp;amp; Tasks[WBS.3]&amp;lt;&amp;gt;BLANK(),Tasks[WBS.3],
                          Tasks[WBS.4]=BLANK() &amp;amp;&amp;amp; Tasks[WBS.3]=BLANK() &amp;amp;&amp;amp; Tasks[WBS.2]&amp;lt;&amp;gt;BLANK(),Tasks[WBS.2])&lt;/LI-CODE&gt;
&lt;P&gt;The result is as shown :&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I have attached my pbix file , you can refer to it .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Ailsa Tao&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 07:29:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Converting-Project-WBS-to-Parent-Child-Heirarchy/m-p/2666671#M79308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-28T07:29:47Z</dc:date>
    </item>
  </channel>
</rss>

