Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

visualising dependent tasks (Predecessors and Successors) in Power BI

 I’m looking for a way to show a chain of predecessors  and successors for every task.
It means I need to find dependent tasks to finally see the impact of slacks on projects.
I've prepared a sample data that shows the Output.
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.
The Successors column is a list of tasks that should be done after the task in each row.
It is possible every predecessor index has its own predecessors in its row. In result we have a chain of related tasks.

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.

The question is: for each task that I select in another page shows the chain of related tasks  like the output in the excel file.
I’m not sure whether using DAX is better or M. But is my second problem. Also, have no idea that output should be a list or record or table for each task?
I would appreciate it if you help me and guide me to solve the problem.

Thanks for taking time in advance.

IdIndexProjectIdPredecessorsSuccessors
101160 2
1022601,7 
103360 8
104122 2,6
1052221 
1065222 
1076226 
1086602 
109760 8
1108607 

 

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
    I used MAXX but it just retrievie Taskid for evey row and I don't know how find the predessessors of each predecessor.
    MAXX(FILTER(Dependency, Dependency[Index] = _Predecessors && [ProjectId] = _ProjectId ),Dependency[TaskId]))
  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 
    Try:

    MAXX(FILTER(allselected('Dependency'), 'Dependency'[Index] = in values([_Predecessors] && [ProjectId] = max([_ProjectId]),Dependency[TaskId]))

     

    One thing I am not sure is what are _Predecessors and _ProjectId, are they variables, measures or columns?

     


    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks. _Predecessors is a variable.
      But Still not working.