Skip to main content
cancel
Showing results for
Search instead for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User

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])

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime
2 REPLIES 2
New Member

Thanks a lot, exactly what I needed 👍

Super User

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])

DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

## Helpful resources

Announcements

#### Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors