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.

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

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

 


@ 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!:
The Definitive Guide to Power Query (M)

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


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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