cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cubedweller Frequent Visitor
Frequent 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 <3 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_error.jpgPower Query Error

 

 

data_sample.jpgData

 

Thank you.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: power query formula error: cannot apply operator <

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.

1 REPLY 1
Super User
Super User

Re: power query formula error: cannot apply operator <

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.