Power Query M code
let
Source = YourTable,
CutoffDate = Date.AddDays(DateTime.Date(DateTime.LocalNow()), -30),
FilteredRows = Table.SelectRows(Source, each [DateColumn] >= CutoffDate)
in
FilteredRows
Filters a source to only the most recent N days, to keep refreshes fast during development.
let
Source = YourTable,
CutoffDate = Date.AddDays(DateTime.Date(DateTime.LocalNow()), -30),
FilteredRows = Table.SelectRows(Source, each [DateColumn] >= CutoffDate)
in
FilteredRows
Generate a date table in Power Query M
Change -30 to however many days back you want to load; remove this filter before publishing if the report needs full history.
Browse all 145 snippets in the Power Query M Code Snippets, or search the library for something similar to Load Only the Last N Days of Data.