• Skip to main content
  • Skip to footer

Curbal

Learn how to grow your business with your data and Power BI

  • Data Stories
    • Power BI Stories
    • 1 dataset, 100 matplotlib visualizations
  • Learning Portal
    • Download Center
    • 25 Days Challenge
    • DAX Glossary
    • Power BI
    • Power BI by Topic
    • Python
    • 1 dataset, 100 matplotlib visualizations
  • Courses
    • Power BI Mini Master Class 1: Using a REST API as a data source
    • Power BI Master Class 1: COVID Tracker
    • Introduction to Power BI – FREE Online course
    • M Language + Power Query Course Bundle
    • Power Query Online Training [updated 2022]
    • M Language Online Course: The unofficial and Practical Reference Guide [updated 2025]
    • My Courses
  • Shop
    • Courses
    • Master Classes
    • Template Apps
    • JSON Themes
  • Cart
  • Register/ Log In
    • Become a Member
    • Log In
    • My account
    • My Courses
  • Search
  • Contact
You are here: Home / CM Tooltip Glossary Pro+ / TIME

TIME

posted on November 29, 2017

« Back to Glossary Index

Syntax

TIME(hour, minute, second)

Tutorial with example: Calculate working hours with DAX in Power BI

In today’s DAX Fridays we will learn how Power pivot or Power BI manages time using the TIME function.
We will also create an example with the TIME function where we will calculate the working hours in a calendar.

DAX Fridays! #48: TIME (Calculate working hours)

Download example file:

To get the files:
1. Go to Curbal Download Center > Dax Fridays
2. Get File #48

Remarks

In contrast to Microsoft Excel, which stores dates and times as serial numbers, DAX works with date and time values in a datetimeformat. Numbers in other formats are implicitly converted when you use a date/time value in a DAX function. If you need to use serial numbers, you can use formatting to change the way that the numbers are displayed.

Time values are a portion of a date value, and in the serial number system are represented by a decimal number. Therefore, the datetime value 12:00 PM is equivalent to 0.5, because it is half of a day.

You can supply the arguments to the TIME function as values that you type directly, as the result of another expression, or by a reference to a column that contains a numeric value. The following restrictions apply:

  • Any value for hours that is greater than 23 will be divided by 24 and the remainder will be treated as the hour value.
  • Any value for minutes that is greater than 59 will be converted to hours and minutes.
  • Any value for seconds that is greater than 59 will be converted to hours, minutes, and seconds.
  • For minutes or seconds, a value greater than 24 hours will be divided by 24 and the reminder will be treated as the hour value. A value in excess of 24 hours does not alter the date portion.

To improve readability of the time values returned by this function, we recommend that you format the column or PivotTable cell that contains the results of the formula by using one of the time formats provided by Microsoft Excel.

This DAX function may return different results when used in a model that is deployed and then queried in DirectQuery mode. For more information about semantic differences in DirectQuery mode, see http://go.microsoft.com/fwlink/?LinkId=219171.

Was this helpful?
Related Articles:
  • 25 Days of DAX Fridays! Challenge
  • 25 Days of DAX Fridays! Challenge – Ed1: NorthWind Company
  • 25 days of DAX Fridays! Challenge – Ed2: World Cup
  • 25 Days of DAX Fridays! Challenge – Edition 3: Original Northwind dataset
  • Export Google Analytics data to Microsoft Power BI
See Also:
  • CEILING
  • COMBINEVALUES
  • DATEADD
  • DATESINPERIOD
  • DISTINCT
« Back to Index

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Footer CTA

Join our community of +50,000 professionals

Become a Member

Subscribe to YouTube

About me:

Curbal AB
Badhusgatan 7B
722 15 – Västerås
Sweden

OrgNo: 5569680852 | VAT: SE556968085201

 

Location:

© Copyright 2014-2025 · Curbal AB · All Rights Reserved · Privacy Policy · Terms of Service · Refund Policy · Log In