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..
Thanks - I've rechecked and this is the flow structure:
- Staging Dataflow - Loads table with DateTime column
- Transformation 1 - Loads linked entity from the Staging Dataflow, converts column to Date type
- Transformation 2 - Loads linked entity from Transformation 1 (column is Date type), performs > operation
So I would think that as I cast the column to Date type it should mean that even if the source data changed it should not impact my dataflows.
An example of the error is below, in case useful
We cannot apply operator < to types Date and DateTime. Operator = < Left = 6/14/2021 12:00:00 AM Right = 12/16/2019 12:00:00 AM.
Also to note - when I view the dataflow the preview calculates correctly without any errors or warnings.
Thanks for your help