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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Bennasy23
New Member

Calculate sum time per categores

Hello in data table i have column "Time spent" column format is "Time (hh:mm:ss).

 

When i add "Time spent" in chart, in value, i cant sum, average and so on...

It is possible sum time in POWER BI ?

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Bennasy23,

AFAIK, common charts will display the summarized values based on the current category(axis, legend). (For date/time type values, they can't able to be aggregated.)
Perhaps you can try to convert your duration to total second format then you can simply use them on chart value fields.

Aggregating Duration/Time - Microsoft Power BI Community
Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
Blackhag
New Member

I've registed specifically to answer this, as i've found a very simple answer:

if you don't mind that the displayed value will be a decimal number (i.e. 1.25 instead of 1:15:00) - you should just do as follow:

1. in the query - change the "Time spent" field from "time" to "decimal number".

2. still in the query - select the column, go to Transform > Standard (Number column) > Multiply > and enter 24 as the multiplied number.

 

that's it!

 

now you can sum your data in the field and recive the amount of hours you used for that task.  you just have to remember that values will be decimal so if you see 1.5 it means 1 and a half hours (and NOT 1 hour and 50 minutes).

 

Enjoy 😉

v-shex-msft
Community Support
Community Support

Hi @Bennasy23,

AFAIK, common charts will display the summarized values based on the current category(axis, legend). (For date/time type values, they can't able to be aggregated.)
Perhaps you can try to convert your duration to total second format then you can simply use them on chart value fields.

Aggregating Duration/Time - Microsoft Power BI Community
Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
selimovd
Super User
Super User

Hey @Bennasy23 ,

 

in general you can't sum values with the format time directly.

You have to do a workaround. For example to calculate everything in seconds, then you can sum them up. Then you have to change the display in hh:mm:ss with a DAX measure.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

yes i need help. Could u help me ?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.