Forum Discussion
Incorrect Errors in Appearing in Dataflows
- 5 years ago
I have discovered a workaround that seems to have removed the error, which can hopefully help some people in the short term. I don't think this should be necessary though - this seems to be a more fundamental issue in Power BI service?
The workaround for me was to cast the (date type) field to a date type in the filter logic, for example:
From[Record Date] > DateTime.Date(DateTime.LocalNow())
toDateTime.Date([Record Date]) > DateTime.Date(DateTime.LocalNow())
Just to reiterate that [Record Date] field is already of Date type..
I am getting the same error on a dataflow that has been running for a long time. It began to fail early on Jun-14 and and failed everytime since. The error message is
We cannot apply operator < to types Date and DateTime. Operator = < Left = 4/1/2021 12:00:00 AM Right = 10/31/2020 12:00:00 AM
I have discovered a workaround that seems to have removed the error, which can hopefully help some people in the short term. I don't think this should be necessary though - this seems to be a more fundamental issue in Power BI service?
The workaround for me was to cast the (date type) field to a date type in the filter logic, for example:
From
[Record Date] > DateTime.Date(DateTime.LocalNow())
to
DateTime.Date([Record Date]) > DateTime.Date(DateTime.LocalNow())
Just to reiterate that [Record Date] field is already of Date type..