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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.