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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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