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
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
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.