Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All
I am able to filter my dataset for Last month using
= Table.SelectRows(Source, each Date.IsInPreviousMonth([LoadDate]))
How would I amend this so I filter for 2 months ago only? So not the last two months as that would include last month, I only want the data for two months ago
Hope that is help. any assistance appreciated!
Solved! Go to Solution.
@Anonymous , For filtering data for last twomonths you can use
let
Source = ... , // Your existing data source
TwoMonthsAgoStart = Date.StartOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()), -2)),
TwoMonthsAgoEnd = Date.EndOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()), -2)),
FilteredRows = Table.SelectRows(Source, each [LoadDate] >= TwoMonthsAgoStart and [LoadDate] <= TwoMonthsAgoEnd)
in
FilteredRows
Proud to be a Super User! |
|
@Anonymous , For filtering data for last twomonths you can use
let
Source = ... , // Your existing data source
TwoMonthsAgoStart = Date.StartOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()), -2)),
TwoMonthsAgoEnd = Date.EndOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()), -2)),
FilteredRows = Table.SelectRows(Source, each [LoadDate] >= TwoMonthsAgoStart and [LoadDate] <= TwoMonthsAgoEnd)
in
FilteredRows
Proud to be a Super User! |
|
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.