Forum Discussion

chintusasmal123's avatar
2 years ago
Solved

Suming Time

I want to calculate the sum of time taken my each employee and also days based on that total time. For example 100 task(each record) takes 00:20:00 (20 min for each task) , so total will be 2000 min...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi chintusasmal123 

     

    The time type in Power BI represents a point in time rather than a Duration. As the current column is in Time type, you can create a new column with below DAX to convert it into minutes. 

    Time (Minutes) = HOUR('Table (2)'[TimeHHMM])*60 + MINUTE('Table (2)'[TimeHHMM])

    Then use the new minutes column for calculation. Create measures:

    Total Time (Minutes) = SUM('Table (2)'[Time (Minutes)])
    Total Days = [Total Time (Minutes)] / (8.5*60)

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!