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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

24 HR Time Conversion - Data Fact Checking

Greetings Power BI Ninjas!

 

Your expertise is needed. I have a calculated column, RuntimeHours, which convered seconds to hours. I also have a date table with connected relationship.

 

PROBLEM: I am struggling to get my data to be correct. From the sample screenshot below, RuntimeHours are > 24hrs. We obviously know that this is incorrect because there are only 24 hours in a day.

 

SOLUTION NEEDED: Help to get the runtime hours to calculate true to the date references:

- Day = 24hrs or less

- Month = 730hrs or less

- Quarter = 2190hrs or less

- Year = 8760hrs or less

 

FYI, the Calendar table references are as follows:

 

- DayInMonth = DAY('Calendar'[Date]) -> WHOLE NUMBER data type

- Month = FORMAT('Calendar'[Date], "MMM") -> TEXT data type

- FiscalQuarterNumber = (IF ('Calendar'[CalendarMonthNumber] < 4, 4, 'Calendar'[QuarterNumber] -1)) -> WHOLE NUMBER data type

- FiscalYear = IF('Calendar'[CalendarMonthNumber] < 4, 'Calendar'[Year] -1, 'Calendar'[Year]) -> WHOLE NUMBER data type

 

FYI, the RuntimeHours reference are as follows:

 

-  RuntimeHours = (([RuntimeSeconds] / 60) / 60) -> Decimal Number -> meaning 812seconds = 0.23 hours

 

Any assistance to get this data correct will be greatly appreciated! THANK YOU!!

 

24hrCalculation.png

3 REPLIES 3
AlB
Community Champion
Community Champion

Hi @Anonymous

Where is the seconds value you want to convert to hours? What is the code for [RuntimeSeconds]? Is it a measure or a column?

Is 'RuntimeHours' supposed to be a measure? If so, where and how will you use it?

 

Anonymous
Not applicable

@AlB Thank you for your response. RuntimeSeconds is the raw data so it is a column and I created a calculated column to convert the seconds to hours (RuntimeHours). RuntimeHours was created as a calculated column.

 

I am not sure on how to create RuntmeHours as a measure. The current calculated column is as follows

 

RuntimeHours = (([RuntimeSeconds] / 60), 60)

 

Any ideas on how I should proceed?

@Anonymous,

 

Make sure the data in [RuntimeSeconds] are correct. You may use DAX Studio to capture queries.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.