I'm creating a report in PowerBI, and need to filter out some erroneous record from my source. Its a payment table, and some records are with a future date, eg in 2799. I'd like to make a Filter to remove records after today + 1 year. I already had this filter :
= Table.SelectRows(_cobranca, each [Vencimento] >= DATA_LIMITE)
DATA_LIMITE
is a parameter, and the code above is already working. I tried to change it to :
= Table.SelectRows(_cobranca, each [Vencimento] >= DATA_LIMITE and [Vencimento] <= DateTime.LocalNow())
But I'm getting this error:
DataFormat.Error: Syntax error in date in query expression '[_].[Vencimento] >= #2020-01-01 00:00:00# and [_].[Vencimento] <= #2020-10-21 10:58:07.4411693'.
It seems that DateTime.LocaNow function is not returning the date in the correct format.
and
a couple of dates. – Alexis Olson[Vencimento]
column andDATA_LIMITE
just Date type? – Alexis Olson