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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
LinlookZDJ
Helper I
Helper I

Sum duration column and display in chart

Dear Power BI Experts,

 

I have edited my Time Gap column to duration type but I am unable to sum the duration column in my desktop. There is only count function available, is there anything i have missed out?

 

I would like to create a chart to display the total sum or average of duration for individual machine. 

 

LinlookZDJ_1-1629434272896.png

 

LinlookZDJ_0-1629434248871.png

 

Attached my dashboard and raw files for your reference:

https://drive.google.com/drive/folders/1bobrSCuXLHAm1xeJWCndMAscVgvw_mzJ?usp=sharinghttps://drive.go...

 

Thank you for your time!

 

Best regards

Lin

 

 

1 ACCEPTED SOLUTION

HI @LinlookZDJ,

AFAIK, power bi data model tables do not support duration types and you cant use these types which are not support summarized on chart value fields. (date/time and durations types cannot be aggregate)

For this scenario, I'd like to suggest you convert them to 'total seconds' in whole number type. Then you can simply use them on visual value fields and they will be auto aggregated.

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
community_pinki
Helper II
Helper II

Hi @LinlookZDJ ,

 

You cannot take a sum of TimeGap column as it is not a numerical value type column So there's only option to take count and distinct count.

Hi, 

 

I wanted to display durations in my charts. However, I haven't figured out how to do it in a proper way.

Currently I'm using a column that represent duration as a decimal number. I have been trying to look at different blogs but doesn't lead me to the correct output. 

 

I have also tried to create a measure using the following code to convert decimal duration and display in dd:hh:mm:ss but still unable create a visual chart. 

 

 decimal08.png

 

Appreciate if you can guide me and give me an example.

 

Thanks!

 

Best regards

Lin

HI @LinlookZDJ,

AFAIK, power bi data model tables do not support duration types and you cant use these types which are not support summarized on chart value fields. (date/time and durations types cannot be aggregate)

For this scenario, I'd like to suggest you convert them to 'total seconds' in whole number type. Then you can simply use them on visual value fields and they will be auto aggregated.

Regards,
Xiaoxin Sheng

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

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors