Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am trying to transform this data to calculate the Turnaround days. I tried to copy the query two times to groupby the Min and Max date for Prject and Process step. But after merging it back into the original table the Min and Max values were incorrectly showing.
I need some guidance.
Thank You,
Christian S.
Project Name | Project Start Date | Project Stop Date | Process Step | Process Step Assigned to | Completd By | Turnaround Days (Overall) | Turnaround Days by Process Step | Turnaround Days by Team | |
2345 | 1/3/2023 | 1/31/2023 | A | Initiator Step | 1/6/2023 12:21 | 28 | complete date - start date(3.5 days) | ||
2345 | 1/3/2023 | 1/31/2023 | B | Team 1 | 1/30/2023 10:39 | 28 | process step A Max complete date - Min Complete Date | Team complete date minus previous Team complete Date (23.9 days) | |
2345 | 1/3/2023 | 1/31/2023 | C | Team 2 | 1/30/2023 10:41 | 28 | |||
2345 | 1/3/2023 | 1/31/2023 | D | Team 3 | 1/30/2023 10:41 | 28 | |||
2345 | 1/3/2023 | 1/31/2023 | D | Team 2 | 1/30/2023 10:44 | 28 | |||
2345 | 1/3/2023 | 1/31/2023 | E | Team 4 | 1/30/2023 12:53 | 28 | |||
2345 | 1/3/2023 | 1/31/2023 | E | Team 3 | 1/30/2023 13:14 | 28 | |||
2345 | 1/3/2023 | 1/31/2023 | F | Team 5 | 1/30/2023 13:14 | 28 | |||
2345 | 1/3/2023 | 1/31/2023 | F | Team 6 | 1/31/2023 8:08 | 28 | |||
2345 | 1/3/2023 | 1/31/2023 | F | Team 7 | 1/31/2023 8:08 | 28 | |||
3542 | 1/3/2023 | 3/13/2023 | A | Initiator Step | 1/3/2023 15:07 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | B | Team 1 | 1/20/2023 14:17 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | C | Team 2 | 1/20/2023 15:28 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | D | Team 8 | 1/20/2023 15:28 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | D | Team 9 | 1/20/2023 15:28 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | D | Team 10 | 2/2/2023 10:13 | 69 | |||
| 1/3/2023 | 3/13/2023 | D | Team 2 | 2/2/2023 10:13 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | D | Team 2 | 2/2/2023 10:13 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | D | Team 2 | 3/3/2023 12:23 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | E | Team 11 | 3/4/2023 11:06 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | E | Team 8 | 3/9/2023 14:36 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | F | Team 5 | 3/9/2023 14:36 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | F | Team 6 | 3/9/2023 14:36 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | F | Team 6 | 3/13/2023 9:33 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | F | Team 6 | 3/13/2023 9:33 | 69 | |||
3542 | 1/3/2023 | 3/13/2023 | F | Team 7 | 3/13/2023 9:33 | 69 |
|
please indicate the expected outcome based on your sample data
Project | Project Start Date | Step | Action | Action Assigned To | Action Date Completed | Turn Around Days (Step) | Turn Around Days (Action Assigned To) |
100 | 3-Jan | A | 1 | Team 1 | 3-Jan | 2 | 0 |
100 | 3-Jan | A | 2 | Team 2 | 5-Jan | 2 | 2 |
100 | 3-Jan | B | 3 | Team 3 | 11-Jan | 10 | 6 |
100 | 3-Jan | B | 4 | Team 4 | 13-Jan | 10 | 8 |
100 | 3-Jan | B | 5 | Team 5 | 15-Jan | 10 | 10 |
100 | 3-Jan | C | 6 | Team 6 | 24-Jan | 15 | 9 |
100 | 3-Jan | C | 7 | Team 7 | 30-Jan | 15 | 15 |
101 | 25-Jan | A | 1 | Team 1 | 26-Jan | 10 | 1 |
101 | 25-Jan | A | 2 | Team 2 | 30-Jan | 11 | 5 |
101 | 25-Jan | A | 3 | Team 3 | 5-Feb | 11 | 11 |
101 | 25-Jan | B | 4 | Team 4 | 7-Feb | 3 | 2 |
101 | 25-Jan | B | 5 | Team 5 | 10-Feb | 3 | 5 |
101 | 25-Jan | C | 6 | Team 6 | 10-Feb | 5 | 0 |
101 | 25-Jan | C | 7 | Team 7 | 14-Feb | 5 | 4 |
101 | 25-Jan | C | 8 | Team 8 | 15-Feb | 5 | 5 |
The actions in the next step can not be worked unless all the actions in the previous step are completed |
Step Turn Around Time
Summary:
The process Steps (A-C) are part of a project. The next step can not be completed until all of the actions are completed for the previous step. (The time that the process starts for A is the Project Start Date)
note that this step turnaround time will be repeating due to the action item is the lowest level in the heiarchy.
How I got 10 is I subtracted Jan 15 from Jan 5. where Jan 15th is the last day in step completed B and Jan 5th is the last step completed in setp A. Result is the total turnaround day from Last Step in Step A and Last Step in B.
The idea Is that when the last action in the previous step is completed. the next step's timer is going to begin.
Action Turn Around
Summary
I am calculating the Action Turnaround time by subtracting the Completed date of the Action from the previous action from the completed date of the current action I am calculating for. The first action turnaround time is calculated from the project start date.
Thank You,
Chris.
@Csalinas144 I was asking about the first line of project 101 with step A and action completed - Jan 26th. I though that step days of this line should be the same for all other actions of step A (2 of them below are 11). For some reason it is 10 and I can't figure out why
@Csalinas144 another question: project 101, step B. Why step days = 3? It's 2nd step of the project, should be "end of step B" - "end of step A" = "10-Feb" - "5-Feb" = 5. It works in project 100, this is what you explained earlier. Why 101 is so different?
Project | Project Start Date | Step | Action | Action Assigned To | Action Date Completed | Turn Around Days (Step) | Turn Around Days (Action Assigned To) |
100 | 3-Jan | A | 1 | Team 1 | 3-Jan | 2 | 0 |
100 | 3-Jan | A | 2 | Team 2 | 5-Jan | 2 | 2 |
100 | 3-Jan | B | 3 | Team 3 | 11-Jan | 10 | 6 |
100 | 3-Jan | B | 4 | Team 4 | 13-Jan | 10 | 8 |
100 | 3-Jan | B | 5 | Team 5 | 15-Jan | 10 | 10 |
100 | 3-Jan | C | 6 | Team 6 | 24-Jan | 15 | 9 |
100 | 3-Jan | C | 7 | Team 7 | 30-Jan | 15 | 15 |
101 | 25-Jan | A | 1 | Team 1 | 26-Jan | 10 | 1 |
101 | 25-Jan | A | 2 | Team 2 | 30-Jan | 10 | 5 |
101 | 25-Jan | A | 3 | Team 3 | 5-Feb | 10 | 11 |
101 | 25-Jan | B | 4 | Team 4 | 7-Feb | 3 | 2 |
101 | 25-Jan | B | 5 | Team 5 | 10-Feb | 3 | 5 |
101 | 25-Jan | C | 6 | Team 6 | 10-Feb | 5 | 0 |
101 | 25-Jan | C | 7 | Team 7 | 14-Feb | 5 | 4 |
101 | 25-Jan | C | 8 | Team 8 | 15-Feb | 5 | 5 |
@Csalinas144 In my view , your data are still inconsistent. Here is a code. I still can't get and explain your "3" in step B of project 101.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fdG9CoQwEATgV5HUCtn8qK0eWFjbiYWC5d37l2aUlQu6WywZyEcWJvNsyFpTGl+N6y+dXRpKM+3rt6D7YinfoGOIEAXYIzNEIFJkYIlA0nLIyBKBpO2fNDVLBBcU2bBE8PZPogoXpZJcrdGsJv3VrKhYDfv2Jh9FNZrMi7ISfTSl06wqChptmbbXT510OQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [project = _t, start = _t, step = _t, action = _t, team = _t, completed = _t]),
types = Table.TransformColumnTypes(Source,{{"completed", type date}, {"start", type date}}),
gr_project = Table.Group(types, {"project"}, {{"gr_project", each _}}),
// project processing function
fx_project = (w as table) as table =>
let
group = Table.Group(w, {"start", "step"}, {{"max_completed", each List.Max([completed]), type nullable date}, {"min_completed", each List.Min([completed]), type nullable date}, {"all", each _, type table [project=nullable text, start=nullable date, step=nullable text, action=nullable text, team=nullable text, completed=nullable date]}}),
index = Table.AddIndexColumn(group, "idx", 0, 1, Int64.Type),
// function for teams
fx_ta_teams = (x as table, d as date) as table =>
[a = Table.DuplicateColumn(x, "completed", "ta_teams"),
b = Table.TransformColumns(a, {"ta_teams", (x) => Duration.Days(x - d) })][b],
ta_step =
Table.AddColumn(
index,
"ta_step",
(x) =>
if x[idx] = 0
then Duration.Days(x[max_completed] - x[min_completed])
else Duration.Days(x[max_completed] - index[max_completed]{x[idx] - 1})
),
ta_teams =
Table.AddColumn(
ta_step,
"all_teams",
(x) =>
if x[idx] = 0
then fx_ta_teams(x[all], x[start])
else fx_ta_teams(x[all], ta_step[max_completed]{x[idx] - 1})
),
cols = Table.SelectColumns(ta_teams,{"ta_step", "all_teams"}),
expand = Table.ExpandTableColumn(cols, "all_teams", {"project", "start", "step", "action", "team", "completed", "ta_teams"}),
reorder = Table.ReorderColumns(expand,{"project", "start", "step", "action", "team", "completed", "ta_step", "ta_teams"})
in
reorder,
project_processing = Table.TransformColumns(gr_project, {"gr_project", fx_project}),
combine = Table.Combine(project_processing[gr_project])
in
combine
Max Completed date of A = 5-Feb (action 3)
Max Completed date of B = 10-Feb (action 5)
Max Date of B = Jan 15
Max Date of A = Jan 5
DIfference of 10 days
is it a joke? all this time I was talking about project 101. I am sorry, I give up.
No, it is not. I apologize for the errors. The way it works for project 100 should have been the same for 101. Let me correct this with a clear mind. And reply back in a little bit.
Again I am sorry
Chris
B (Action 5) - A (Action 2) = 10 step turnaround for Step B
Hi, @Csalinas144
this line:
101 | 25-Jan | A | 1 | Team 1 | 26-Jan | 10 | 1 |
could you please explain how 10 is calculated? at the same time 2 next lines are 11
Please use the other data table. I corrected my mistake.
Thank You
Chris