cancel
Showing results for
Did you mean:
New Member

## Average per time intervall

Hi,

I want to calculate how the average ticket handling time changes over time. I have service tickets in Jira, which take a certain time to be solved.

 Ticket Closed date Duration (min) 1 15.1.2022 4 2 19.1.2022 7 3 3.2.2022 2 4 9.2.2022 9 5 27.2.2022 5 6 1.3.2022 7 7 9.3.2022 8

I want to document that by end of January the average handling time was (4+7)/2. In Febrary (incl. the history of January) average time was (4+7+2+9+5)/5. In March (incl. the history of January+February) average time was (4+7+2+9+5+7+8)/7.

Thanks

Alex

1 ACCEPTED SOLUTION
Solution Sage

Hi Alex,
calculate cumulative total duration, cumulative rows and dived duration by rows.

Output =
var CumulativeRows=CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[Closed Date]<=Max('Table'[Closed Date])
)
)

var CumulativeDurationMin=CALCULATE(
Sum('Table'[Duration (min)]),
FILTER(
ALL('Table'),
'Table'[Closed Date]<=Max('Table'[Closed Date])
)
)

RETURN
Divide([Cumulative Total], [Cumulative Rows])

Best Stories, Interesting Cases: PowerBI Storytime Newsletter
2 REPLIES 2
New Member

Thanks a lot, exactly what I needed 👍

Solution Sage

Hi Alex,
calculate cumulative total duration, cumulative rows and dived duration by rows.

Output =
var CumulativeRows=CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[Closed Date]<=Max('Table'[Closed Date])
)
)

var CumulativeDurationMin=CALCULATE(
Sum('Table'[Duration (min)]),
FILTER(
ALL('Table'),
'Table'[Closed Date]<=Max('Table'[Closed Date])
)
)

RETURN
Divide([Cumulative Total], [Cumulative Rows])

Best Stories, Interesting Cases: PowerBI Storytime Newsletter

Announcements

#### Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

#### Power BI March 2023 Update

Find out more about the March 2023 update.

Top Solution Authors
Top Kudoed Authors