Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi All,
I am trying to find the average of time spent when doing surveys.
The hours and minutes spent are in different columns.
I cant seem to find how to combine the times together then find the average time spent umong the surveys.
Any help will be greatly appreciated.
Thank you.
Solved! Go to Solution.
Hi @TBSST ,
Based on your description, I created the simple sample, you may check the result:
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @TBSST ,
Based on your description, I created the simple sample, you may check the result:
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
To find the average time spent on surveys in Power BI when the hours and minutes are in different columns, you can follow these steps:
Assuming you have two columns named "Hours" and "Minutes" to represent the time spent on surveys, you can combine them into a single column and then calculate the average. Here's how you can do it:
Combine Hours and Minutes into a Single Column: You can create a custom column that combines the hours and minutes into a single time duration column. You can use the Power Query Editor to do this. Follow these steps:
In the "Custom Column" dialog, use a formula like this to combine hours and minutes:
Duration.From([Hours] & ":" & [Minutes])
This will create a new column that combines the hours and minutes into a time duration.
Calculate the Average Time: After you've combined the hours and minutes into a single column, you can now calculate the average time spent. Here's how:
Average Duration = AVERAGE('YourTableName'[CombinedTimeColumn])
Replace 'YourTableName' with the name of your data table and 'CombinedTimeColumn' with the name of the column where you combined hours and minutes.
Now you have a measure called "Average Duration" that gives you the average time spent on surveys. You can add this measure to your visuals and reports to display the average time.
Make sure that the "CombinedTimeColumn" in your model is set as a duration data type so that the AVERAGE function can calculate the average correctly.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
Is there any chance that you can create a column and do all your calculations in minutes?
When you get the result that you want (in minutes), you can then adapt one of these to format as hh:mm:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
12 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
14 | |
13 | |
12 |