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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
SChariton
New Member

Convert Seconds to Hours

I'm working with time duration that comes in seconds. I've already converted the metric to hh:nn:ss, but that won't work for our purposes as we need a sum or average to show for whatever time frame the end user selects. Two alternatives were suggested, but I'm unable to get the DAX formula to work. 

 

I'd like to convert seconds to hours so 30 min shows as .5 and so on. I've been unable to find a formaula for this, however. 

 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @SChariton ,

 

As @lbendlin  said, you can divide the seconds value by 3600 to get the hour value. Detailed steps are shown below.


1. Based on your description, I created this data.

vkaiyuemsft_0-1709026935650.png

2. Create a calculated column or measure and write an expression. In this example I created a calculated column. For more information about the divide function, please refer to the documentation: DIVIDE function (DAX) - DAX | Microsoft Learn.

hour = DIVIDE('Table'[sec],3600)

3. The results can be formatted in the table tool, in this example I kept the results to 3 decimal places.

vkaiyuemsft_1-1709026993279.png

4. The final result is shown in the figure below.

vkaiyuemsft_2-1709027005483.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

2 REPLIES 2
Anonymous
Not applicable

Hi @SChariton ,

 

As @lbendlin  said, you can divide the seconds value by 3600 to get the hour value. Detailed steps are shown below.


1. Based on your description, I created this data.

vkaiyuemsft_0-1709026935650.png

2. Create a calculated column or measure and write an expression. In this example I created a calculated column. For more information about the divide function, please refer to the documentation: DIVIDE function (DAX) - DAX | Microsoft Learn.

hour = DIVIDE('Table'[sec],3600)

3. The results can be formatted in the table tool, in this example I kept the results to 3 decimal places.

vkaiyuemsft_1-1709026993279.png

4. The final result is shown in the figure below.

vkaiyuemsft_2-1709027005483.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

lbendlin
Super User
Super User

Have you considered dividing the seconds by 3600 ?

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.