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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
olimilo
Continued Contributor
Continued Contributor

Get date from datetime column, source is live connection

I'm trying to compare the current date against a column that is formatted as a datetime column in the source PBI dataset. I've re-set the Format from a datetime format to just yyyy-MM-dd in the report:

 

olimilo_1-1724975355369.png

 

Since none of the sample data are equivalent to the current date, I just used a dummy date (Aug 27) to check if it works:

'Project'[X_DATE_CLOSED] = DATEVALUE("2024-08-27")

 

However, I am not getting the correct result which I assume is because of X_DATE_CLOSED being a datetime column:

olimilo_0-1724975337684.png

 

Is there a way I can get only the date part of a datetime value? FORMAT() doesn't work in this case since it is a live connection.

 

1 ACCEPTED SOLUTION
olimilo
Continued Contributor
Continued Contributor

Using DATEVALUE() on the datetime column seems to have gotten me the correct output.

 

Column = DATEVALUE('Project'[X_DATE_CLOSED]) = DATEVALUE("2024-08-27")

 

 

olimilo_0-1724975696823.png

 

 

View solution in original post

1 REPLY 1
olimilo
Continued Contributor
Continued Contributor

Using DATEVALUE() on the datetime column seems to have gotten me the correct output.

 

Column = DATEVALUE('Project'[X_DATE_CLOSED]) = DATEVALUE("2024-08-27")

 

 

olimilo_0-1724975696823.png

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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