<?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: How to show a chain of dependent tasks in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1837429#M29394</link>
    <description>&lt;P&gt;Thanks for getting back to me. I couldn't use the hierarchy functions. Because there are some tasks in the TaskIndex column which aren't in Predecessors column. So, This problem raises an error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 04:21:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-05-12T04:21:17Z</dc:date>
    <item>
      <title>How to show a chain of dependent tasks</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1833088#M29359</link>
      <description>&lt;H3&gt;&lt;SPAN&gt;I’m looking for a way to find a chain of predecessors&amp;nbsp; and successors for every task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It means I need to find dependent tasks to finally see the impact of slacks in projects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've prepared a sample data that shows the Output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this table, there is a Predecessors Column that contains a list of task indexes that should be done before the task in each row.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Successors column is a list of tasks that should be done after the task in each row.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It is possible every predecessor index has its own predecessors in its row. In result we have a chain of related tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the problems is, indexes are not unique and for retrieving Id (That is unique) I need to check ProjectId as well. ProjectId of the index = ProjectId of predecessors in their rows.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The question is: for each task that I select in another page shows the chain of related tasks &amp;nbsp;like the output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I’m not sure whether using DAX is better or M. Also, I have no idea that output should be a list or record or table for each task?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would appreciate it if you help me and guide me to solve the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for taking the time in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/H3&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Id&lt;/TD&gt;&lt;TD&gt;Index&lt;/TD&gt;&lt;TD&gt;ProjectId&lt;/TD&gt;&lt;TD&gt;Predecessors&lt;/TD&gt;&lt;TD&gt;Successors&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;1,7&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;103&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;2,6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;105&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;106&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;107&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;108&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;109&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;110&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;In this table, for Id = 102&amp;nbsp; that index=2 :&lt;BR /&gt;1-check predecessors column: 1 and 7,&lt;BR /&gt;2-Check the index column to find a index 1,&lt;BR /&gt;3-Check the ProjectId that Should be the same: Index 2 ProjectId = 60, So Project Id for Index = 1 should be 60.&amp;nbsp;&lt;BR /&gt;4-Do step 1,2,3,4 for index = 1. here it is blank.&amp;nbsp;&lt;BR /&gt;5- Do step 2,3,4 for index = 7&lt;BR /&gt;6: Depends on the number of tasks in the list of Predecessors field it should be irritated.&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Output :&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;&lt;BR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="397" data-lia-user-login="dm-p" class="lia-mention lia-mention-user"&gt;dm-p&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;@Greg_Deckler&lt;/H3&gt;&lt;H3&gt;@Eric_Zhang&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 01:08:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1833088#M29359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-12T01:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to show a chain of dependent tasks</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1837221#M29391</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Chain structure seems not suitable for power bi data model table.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;In my opinion, I'd like to suggest you convert them to parent-child hierarchy and use hierarchy level instead of the relationship direction.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://www.daxpatterns.com/parent-child-hierarchies/" target="_blank"&gt;Parent-child hierarchies – DAX Patterns&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 02:04:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1837221#M29391</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-12T02:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to show a chain of dependent tasks</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1837429#M29394</link>
      <description>&lt;P&gt;Thanks for getting back to me. I couldn't use the hierarchy functions. Because there are some tasks in the TaskIndex column which aren't in Predecessors column. So, This problem raises an error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 04:21:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1837429#M29394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-12T04:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to show a chain of dependent tasks</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1839839#M29403</link>
      <description>&lt;P&gt;I tried another way. I was hoping you would have a look.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;I've written a Query then using Invoke Custom Function added it to a table but it raises an error.&amp;nbsp;&lt;BR /&gt;the query is :&lt;BR /&gt;(TaskId as text, ProjectId as text , Predecessors as number) =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;Task = {},&lt;BR /&gt;PreTask = null,&lt;BR /&gt;PreOrder = {},&lt;BR /&gt;Output =&lt;BR /&gt;if Predecessors &amp;lt;&amp;gt; null then&lt;BR /&gt;let&lt;BR /&gt;PreTask = Table.SelectRows("Dependency", each Dependency[TaskIndex] = Predecessors and Dependency[ProjectId] = ProjectId),&lt;BR /&gt;PreOrder= @Query1(PreTask[TaskId],ProjectId, PreTask[Predecessors]),&lt;BR /&gt;Task =List.Combine(PreOrder, TaskId)&lt;BR /&gt;in&lt;BR /&gt;Task&lt;BR /&gt;else&lt;BR /&gt;Task = List.Combine(TaskId)&lt;BR /&gt;in&lt;BR /&gt;Output&lt;BR /&gt;&lt;BR /&gt;The logic of this query is almost correct but I need to change it.&amp;nbsp;&lt;BR /&gt;Could you please have a look.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 May 2021 04:27:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1839839#M29403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-13T04:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to show a chain of dependent tasks</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1848217#M29472</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;It is possible to use formal to write a recursion to looping table but it not suitable for your scenario. This table includes records with multiple keys and combined with comma, they were not suitable for your custom functions.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;BTW, recursion calculation obviously affects the performance of query table calculation. (e.g. tables with more than a hundred records)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 08:38:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1848217#M29472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-18T08:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to show a chain of dependent tasks</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1850200#M29482</link>
      <description>&lt;P&gt;Thanks,I think it would be better to use SQL queries.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 05:07:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1850200#M29482</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-19T05:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to show a chain of dependent tasks</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1853276#M29505</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Ok, I also think SQL query should be suitable for this analysis, you can also take a look at the below link if helps:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;&lt;A href="https://stackoverflow.com/questions/4188427/sql-query-for-parent-child-chain" target="_blank"&gt;sql server - SQL query for parent-child chain - Stack Overflow&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 07:41:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-show-a-chain-of-dependent-tasks/m-p/1853276#M29505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-05-20T07:41:53Z</dc:date>
    </item>
  </channel>
</rss>

