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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
vsinne
Frequent Visitor

Power BI Total Time Calculation

Hello All,

 

I am trying to calculate overall time an agent had spent on different task in Power BI Desktop. Please help me resolve this issue. We have multiple agent who are working on different task at the same time. each task requires different time period to perform. i want to know overall time spent by each agent on different tickets. Thank you all for your help. 

 Agent IDJob Performed Time 
 13D Print0:20:00 
 2Fabrication0:30:00 
 2CAD16:00:00 
 2Design Help1:00:00 
 3ME5:00:00 
 3ME6:00:00 
 4CAD1:00:00 
 43D print0:30:00 
 43D Print0:30:00 
1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @vsinne,

 

Please check out the attachment. If it's what you want?

TimeCosts =
VAR total =
    SUM ( Table1[Seconds] )
VAR hours =
    INT ( total / 3600 )
VAR minutes =
    INT ( MOD ( total, 3600 ) / 60 )
VAR seconds =
    MOD ( MOD ( total, 3600 ), 60 )
RETURN
    hours & " hours "
        & minutes
        & " minutes "
        & seconds
        & " seconds"

Power_BI_Total_Time_Calculation

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @vsinne,

 

Please check out the attachment. If it's what you want?

TimeCosts =
VAR total =
    SUM ( Table1[Seconds] )
VAR hours =
    INT ( total / 3600 )
VAR minutes =
    INT ( MOD ( total, 3600 ) / 60 )
VAR seconds =
    MOD ( MOD ( total, 3600 ), 60 )
RETURN
    hours & " hours "
        & minutes
        & " minutes "
        & seconds
        & " seconds"

Power_BI_Total_Time_Calculation

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank You so much.

Greg_Deckler
Community Champion
Community Champion

Seems like you need my Duration to Seconds Quick Measure: 

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

If i convert it in Seconds, how can i calculate agent wise total time. How much overall time each agent had spent on those tasks in a limited time period.

Create a calculated column that converts to seconds. Use a measure to SUM that column. I don't know what, specifically, you are trying to achieve. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors