Showing results for 
Search instead for 
Did you mean: 
SSS Regular Visitor
Regular Visitor

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!!

WolfBiber Member

Re: Total Duration from a list of tasks


somthing like this?

maxTDur = MAX(Table2[Duration  ])


SSS Regular Visitor
Regular Visitor

Re: Total Duration from a list of tasks

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!

Helpful resources

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 229 members 2,475 guests
Please welcome our newest community members: