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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
alex320
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. 

TicketClosed dateDuration (min)
115.1.20224
219.1.20227
33.2.20222
49.2.20229
527.2.20225
61.3.20227
79.3.20228

 

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

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

 

olgad_0-1673543636984.png

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

View solution in original post

2 REPLIES 2
alex320
New Member

Thanks a lot, exactly what I needed 👍

olgad
Super User
Super User

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

 

olgad_0-1673543636984.png

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors