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
Anonymous
Not applicable

Aggregating Duration/Time

How can I aggregate the total hours for each ticket priority? I tried to convert the time to decimal but when I tried to get the average, its not aggregating. please help

 

Screenshot_1.jpgScreenshot_2.jpg

4 REPLIES 4
v-huizhn-msft
Employee
Employee

Hi @Anonymous,

The total of 'average of Total Time' and 'Average of Activity Hours'(highlighted in yellow backgroud) should be 1076488.39 and 7.01, right? 'average of Total Time' and 'Average of Activity Hours' are calculted in a measure or calculated column? The total results depend on your formula. Could you please share more details and your sample table for further analysis?


1.PNG

Best Regards,
Angelia

Anonymous
Not applicable

hi @v-huizhn-msft thank you so much for responding. Actually, 'average of Total Time' and 'Average of Activity Hours' are two different columns. What I am concern is converting the Average of Total Time to HH:MM:SS, because currently its in seconds(decimal) I was able to convert it on the query but it doesn't aggregate. 

 

the Average of Total Time is being calculated and converted on the query itself. 

 

---          SEC_TO_TIME(AVG(TIME_TO_SEC(total_time)))   AS  Average of Total Time        ----

 

 

Please dont mind the activity hours because its for different column.

 

sample data.jpg

 

I want to get the average time for each priority. 

 

Please advise. Thank you

Hi @Anonymous,

Please create the measure using the following formula.

Measure-format = FORMAT(AVERAGE(Table2[total_time]),"HH:MM:SS")

1.PNG

2.PNG

Best Regards,
Angelia

Anonymous
Not applicable

Hi @v-huizhn-msft Angelia, 

 

Thank you for your response but how can I get the average by grouping them by priority?

 

Thanks!

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.