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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ribs
Helper I
Helper I

How to compare time stamp columns with logical operators

I have a time stamp column needs to be compared logically if it falls below or above certain time. when I use DAX fucntion, I get data type mismatch error as "DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values"

The function is:

Query1[Del_Time] < "10:00"
Del_Time column is in Time datatype
1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@ribs 

You can use the TIME function to create a time value in DAX. Here is how you can modify your function:

Query1[Del_Time] < TIME(10, 0, 0)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
ribs
Helper I
Helper I

Thank you, that worked!

bhanu_gautam
Super User
Super User

@ribs 

You can use the TIME function to create a time value in DAX. Here is how you can modify your function:

Query1[Del_Time] < TIME(10, 0, 0)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






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.

August 2025 community update carousel

Fabric Community Update - August 2025

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