Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hello, I have a table named "Incidents" and a column named totalDuration_inSeconds, will the following when applied give me the average time of the total incidents? including when i apply extra filters such as region the incident was created?
Solved! Go to Solution.
Hi @Starbug,
You can create one measure as below:
averageDuration = var ave=AVERAGE('Incidents'[totalDuration_inSeconds]) var h = if(LEN(INT(ave/3600))=1,CONCATENATE("0",INT(ave/3600)),CONCATENATE("",INT(ave/3600))) var m = if(LEN(INT(MOD(ave,3600)/60))=1,CONCATENATE("0",INT(MOD(ave,3600)/60)),CONCATENATE("",INT(MOD(ave,3600)/60))) var s = if(LEN(MOD(MOD(ave,3600),60))=1,CONCATENATE("0",left(MOD(MOD(ave,3600),60),2)),CONCATENATE("",left(MOD(MOD(ave,3600),60),2))) var duration=CONCATENATE(h,CONCATENATE(":",CONCATENATE(m,CONCATENATE(":",s)))) return duration |
Best Regards
Rena
Hi @Starbug,
You can create one measure as below:
averageDuration = var ave=AVERAGE('Incidents'[totalDuration_inSeconds]) var h = if(LEN(INT(ave/3600))=1,CONCATENATE("0",INT(ave/3600)),CONCATENATE("",INT(ave/3600))) var m = if(LEN(INT(MOD(ave,3600)/60))=1,CONCATENATE("0",INT(MOD(ave,3600)/60)),CONCATENATE("",INT(MOD(ave,3600)/60))) var s = if(LEN(MOD(MOD(ave,3600),60))=1,CONCATENATE("0",left(MOD(MOD(ave,3600),60),2)),CONCATENATE("",left(MOD(MOD(ave,3600),60),2))) var duration=CONCATENATE(h,CONCATENATE(":",CONCATENATE(m,CONCATENATE(":",s)))) return duration |
Best Regards
Rena
Hey @Starbug ,
I guess this will provide what you are looking for:
https://community.powerbi.com/t5/Desktop/Average-duration-in-dd-hh-mm-ss/td-p/313661
Regards,
Tom
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |