Forum Discussion
Filtering date column data in power query
- 2 years ago
I don't think you can do that in Power Query. I believe you will need to load the entire data set, and then filter. M-code would be something like:
Table.SelectRows(#"Previous Step", each [date_column_to_filter_on] > Date.AddYears(Date.From(DateTime.FixedLocalNow()),-3))If you only want to LOAD the past three years, that would need to be done either at the data source, or, depending on the data source, perhaps in your connector (eg if it involves an api perhaps there is an argument to restrict the data).
I don't think you can do that in Power Query. I believe you will need to load the entire data set, and then filter. M-code would be something like:
Table.SelectRows(#"Previous Step", each [date_column_to_filter_on] > Date.AddYears(Date.From(DateTime.FixedLocalNow()),-3))
If you only want to LOAD the past three years, that would need to be done either at the data source, or, depending on the data source, perhaps in your connector (eg if it involves an api perhaps there is an argument to restrict the data).