Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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.

 

 

2 Replies

  • 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.

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi, Anonymous 

    I can reproduce the problem here.

     

    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’.

    Please check my attached pbix for more details.

    Best Regards,
    Community Support Team _ Eason