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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors