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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Expression Error We cannot apply operator < to types DateTime and Date

Hi I keep the above error even after changing data type to Date for both columns. Trying to create a new custom column based on both columns date comparison.

 

Sodared123_0-1668562433379.png

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

I can reproduce the problem here.

veasonfmsft_0-1669024899623.png

 

As @amitchandak said, you need to make sure the two columns are of the same DateTime/ Date type before creating the custom column.

You need to insert the step after ‘Changed Type’ rather than ‘Added Custom’.

veasonfmsft_2-1669025158262.png

Please check my attached pbix for more details.

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

I can reproduce the problem here.

veasonfmsft_0-1669024899623.png

 

As @amitchandak said, you need to make sure the two columns are of the same DateTime/ Date type before creating the custom column.

You need to insert the step after ‘Changed Type’ rather than ‘Added Custom’.

veasonfmsft_2-1669025158262.png

Please check my attached pbix for more details.

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@Anonymous , Make sure dates are converted  before this new column creation


Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.