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

Barchart showing averagetime Vs. Time Slots

Hello Everyone,

 

I'm trying to graph the average time of processing an item on the relevant Time slot.

 

The Time Slot (X - Axis) is AM 08 - 09, AM, 09 - 10, AM 10 - 11, etc and the DAX for the average time is 

AVG Real Time Processing = FORMAT(AVERAGE(FACT_Master[Real Time Processing]), "HH:nn:SS"), however, PBI is not allowing me to graph this? 
 
is it because the FORMAT for the HH:MM:SS is likely to be a text? IS there anyway to show the average time in relates with the different time slots?
 
Many thanks!
1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @manuelfigueira ,

 

It is not supported to put Time format in Y axis or X axis of chart visual since there is no Duration data type in Power BI currently . There is an idea about this issue, please vote it up,   field-of-duration-type  , and you can add your comments there to improve Power BI and make this feature coming sooner.

 

Please reference: Display-duration-as-HH-MM-SS-on-Y-axis , Aggregating-Duration-Time ,Duration-as-Y-Axis , Plotting times on a graph.

 

As a workaround, you may convert value of the [Producing Time] into Second, then calculate the Average of this seconds value, then convert the Average of this seconds value into Hours with decimal places.

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-xicai
Community Support
Community Support

Hi @manuelfigueira ,

 

It is not supported to put Time format in Y axis or X axis of chart visual since there is no Duration data type in Power BI currently . There is an idea about this issue, please vote it up,   field-of-duration-type  , and you can add your comments there to improve Power BI and make this feature coming sooner.

 

Please reference: Display-duration-as-HH-MM-SS-on-Y-axis , Aggregating-Duration-Time ,Duration-as-Y-Axis , Plotting times on a graph.

 

As a workaround, you may convert value of the [Producing Time] into Second, then calculate the Average of this seconds value, then convert the Average of this seconds value into Hours with decimal places.

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-xicai
Community Support
Community Support

Hi @manuelfigueira ,

 

Would you like to create the [AVG Real Time Processing] in a calculated column, and then put it into the X axis of bar chart ? There is a similar case you may refer to : How to convert seconds to hh:mm:ss .

 

Could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.

 

Best Regards,

Amy 

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-xicai 

 

Thank you for your comments. I managed to gather all the data, and basically what I'm trying ti achieve is to know the average time of producing red shoes per time Slot, e.g. at the bracket AM 8 - 9 produce red shoes takes in average 1h:20m:30s using a stacked column chart,

 

Thanks a lot!!

 

https://www.dropbox.com/scl/fi/shy0tea7dm89lnlkcwsmc/Real_Time_Data.xlsx?dl=0&rlkey=5cfgepwp02vd5ydf...

amitchandak
Super User
Super User

@manuelfigueira , refer if this can help

https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389

https://social.technet.microsoft.com/wiki/contents/articles/33644.powerbi-aggregating-durationtime-i...

https://community.powerbi.com/t5/Desktop/Calculating-day-time-difference/m-p/321189

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hello @amitchandak Thanks a lot for the posts! They really useful.... but still I can't graph the average time and show it on the bars in the format HH:MM:SS!

 

Any suggestion?

 

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.