Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 

 

Zara_Farhadi_0-1620625716055.png

 

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@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
Not applicable

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

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]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors