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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
cubedweller
Regular Visitor

power query formula error: cannot apply operator <

The power query formula shown below is given me the error shown below.

A sample of the data where Completed Paste Due ❤️ Days is displaying "error" is shown below as well.

Task Due Date and Task Finished Date are both of type date.

Any idea how to fix this error?

 

if [Completed Past Due]=1 and ([Task Finished Date]-[Task Due Date])>=0 and ([Task Finished Date]-[Task Due Date])<3 then 1 else 0

 

Power Query ErrorPower Query Error

 

 

DataData

 

Thank you.

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

This should work

 

  1. Change the data type of task finished date and task due date columns to Whole Numbers
  2. Write your formula
  3. Change the data type of task finished date and task due date columns to Date

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

 

This should work

 

  1. Change the data type of task finished date and task due date columns to Whole Numbers
  2. Write your formula
  3. Change the data type of task finished date and task due date columns to Date

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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