Forum Discussion
Driving activity
Hello Power Bi Experts,
I have a dataset as shown below, where an activity "F" has some relationships with 5 activities (A - E).
1. Activity A has FS (Finish to Start) relationship with Activity "F" with 10 days of Lag, meaning Activity F can only start 10 working days after Activity A finishes.
2. Activity B has FS (Finish to Start) relationship with Activity "F" with -10 days of Lag, meaning Activity F can only start 10 working days prior to Activity A finishes.
Similarly, when it comes to SS (Start to Start) as a connection (relationship) type, Activity A starts at the same time as the related activity starts with "Lag" either a positive or a negative value. The same goes with FF (Finish to Finish) as a connection (relationship) type, Activity A finishes at the same time as the related activity finishes with "Lag" either a positive or a negative value.
The sample dataset above shows activity C is driving activity F to start by 21-Aug-2019.
C starts on 7 Aug 2019, and F starts 10 working days later because of the relationship type plus the lag.
What I am trying to find is, out of the above 5 (A to E) activities, which one does drive activity F using DAX in power bi? The conditions that I want to run on DAX are
a. Connection Type (for every type)
b. Lag (Working days, excl Saturdays, Sundays, and certain public holidays)
c. Start or Finish date of activities A to E depending on their connection type to activity F
At present, I use the below as DAX in power bi;
But the "Lag" in the above DAX represents just the number of days, not the working days, including the other public holidays.
I would appreciate your help in this regard.
Regards,
John