Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
I am looking to filter my data and display data for dates that are greater than of equal to 3 months prior (starting the first day of the month) or equal today. I'm not sure if the power query supports this filter. Should this be done on the in advance editor?
Solved! Go to Solution.
You can click the fx beside the formula bar above the table to add a custom step, then paste the following code in the formula bar. Replace "previous step" accordingly.
= Table.SelectRows(#"previous step", each Date.IsInPreviousNMonths([Date], 3) or (Date.IsInCurrentMonth([Date]) and [Date] <= DateTime.Date(DateTime.LocalNow())))
Another code
= Table.SelectRows(#"previous step", each [Date] >= Date.StartOfMonth(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-3)) and [Date] <= DateTime.Date(DateTime.LocalNow()))
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
You can click the fx beside the formula bar above the table to add a custom step, then paste the following code in the formula bar. Replace "previous step" accordingly.
= Table.SelectRows(#"previous step", each Date.IsInPreviousNMonths([Date], 3) or (Date.IsInCurrentMonth([Date]) and [Date] <= DateTime.Date(DateTime.LocalNow())))
Another code
= Table.SelectRows(#"previous step", each [Date] >= Date.StartOfMonth(Date.AddMonths(DateTime.Date(DateTime.LocalNow()),-3)) and [Date] <= DateTime.Date(DateTime.LocalNow()))
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 5 | |
| 4 | |
| 4 |