How can I extract the date from a datetime value in Power BI?

Extracting the date from a datetime value in Power BI refers to the process of isolating and obtaining the specific date component from a datetime data type. This can be achieved by using various built-in functions and expressions in Power BI, such as the Date function or the Format function. By extracting the date, users can easily perform date-based analysis and calculations on their data, making it a crucial step in data analysis and reporting.

Power BI: Extract Date from Datetime


You can use the following syntax in DAX to extract the date from a datetime in Power BI:

date = FORMAT('my_data'[Datetime], "M/D/YYYY")

This particular example creates a new column named date that extracts the date from the column named Datetime in the table named my_data.

The following example shows how to use this syntax in practice.

Example: How to Extract Date from Datetime in Power BI

Suppose we have the following table named my_data in Power BI that contains information about total sales made by some company at specific datetimes:

Suppose that we would like to extract the date from each datetime in the Datetime column.

To do so, click the Table tools tab, then click the icon called New column:

Then type the following formula into the formula bar:

date = FORMAT('my_data'[Datetime], "M/D/YYYY")

This will create a new column named date that contains only the date from the the corresponding datetime in the Datetime column:

Power BI extract date from datetime

For example:

  • The formula extracts 1/1/2024 from 1/1/2024 10:15:00 AM.
  • The formula extracts 1/5/2024 from 1/5/2024 7:15:23 PM.
  • The formula extracts 2/15/2024 from2/15/2024 1:15:09 AM.

And so on.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

x