I'm just learning Power Query and trying to figure out how modify a filter to return data within a dynamic date range. E.g. from Today - 60 days to Today
Here's the code, any help much appreciated.
= Table.SelectRows(#"Changed Type", each [Start] >= Date.AddDays(DateTime.Date(DateTime.LocalNow())-60) and [Start] <= DateTime.Date(DateTime.LocalNow()))
You can do that also in UI.
If your column if type date:


Then when you look into Advanced Editor (or formula bar) you will see that Power Query has dedicated function for that:
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each Date.IsInPreviousNDays([Column1], 60))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With