Forum Discussion
How can I pull data based on a predecessor?
- 3 years ago
Hi lmperplies ,
According to your description, I create a sample.
Activity table:
Predecessors table:
The two tables are related with Activity ID column.
Here's my solution, create three measures.
StartDate = MAXX ( FILTER ( ALL ( 'Activity' ), 'Activity'[Activity ID] = MAX ( 'Predecessors'[Predecessors] ) ), 'Activity'[Start Date] )FinishDate = MAXX ( FILTER ( ALL ( 'Activity' ), 'Activity'[Activity ID] = MAX ( 'Predecessors'[Predecessors] ) ), 'Activity'[Finish Date] )ActivityStatus = MAXX ( FILTER ( ALL ( 'Activity' ), 'Activity'[Activity ID] = MAX ( 'Predecessors'[Predecessors] ) ), 'Activity'[Activity Status] )Then put Activity ID column from Activity table into a slicer, put Activity ID and Predecessors columns from Predecessors table and the three measures into a visual, get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi lmperplies ,
According to your description, I create a sample.
Activity table:
Predecessors table:
The two tables are related with Activity ID column.
Here's my solution, create three measures.
StartDate =
MAXX (
FILTER (
ALL ( 'Activity' ),
'Activity'[Activity ID] = MAX ( 'Predecessors'[Predecessors] )
),
'Activity'[Start Date]
)
FinishDate =
MAXX (
FILTER (
ALL ( 'Activity' ),
'Activity'[Activity ID] = MAX ( 'Predecessors'[Predecessors] )
),
'Activity'[Finish Date]
)
ActivityStatus =
MAXX (
FILTER (
ALL ( 'Activity' ),
'Activity'[Activity ID] = MAX ( 'Predecessors'[Predecessors] )
),
'Activity'[Activity Status]
)
Then put Activity ID column from Activity table into a slicer, put Activity ID and Predecessors columns from Predecessors table and the three measures into a visual, get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much. I was able to get this work.