cancel
Showing results for
Did you mean:
Helper I

## Total Duration from a list of tasks

Good Morning guys,

I need some help with the next issue- I'll try to explain myself the best I can.

My data looks like the following, I have a number of tasks that starts at a day and have a duration. For example, task 1 was started in day 1 and had a duration of 23 days (it ended in day 23), task 2 started in day 3 and ended in day 20 (17 days of duration), etc. Then task 1 changes from the department from X to Y and starts at day 24 with a duration of 1 until it ends (idem with task 2 but from day 21).

My data is distributed in the following way:

Task     Day    Duration   Type of Department

1          1        1                      X

1          2        2                      X

1          3        3                      X

2          3        1                      X

1          4        4                      X

2          4        2                      X

3          4        1                      X

...

1         20       19                    X

2         20       17                    X

...

1         21       19                    X

2         21       1                      Y

...
1         24       1                      Y
2         24       4                      Y
.

So as you can see I have a column for the number of the task, a column for the day where I take the photo of the current state and a column that tells me the duration that the task has until the current day.

My problem is that I need to plot in a graphic the average duration that takes for each department to accomplish the tasks (department X -->18 (task2) + 23 (task1) /2 = 20,5).

How can I made a measure that tells me just the maximum duration of each task for each department?

Thanks a lot!!

2 REPLIES 2
Microsoft

hey,

somthing like this?

`maxTDur = MAX(Table2[Duration  ])`

Helper I

Tanks for your answer @WolfBiber but it is not working as I would like to.

In order to show the data, I'll put it in a graphic that needs to show me the average of time for each type of department.

It means that it will be a line graphic where line 1 is the average time that takes for all the tasks to be completed in department X (as an example).

That is why I need to extract the maximum time that takes for a task to be in a department avoiding the previous values.

With your solution I can extract the value of the MAX but I am not able to make an average of these values according the department!

Announcements