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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.