Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi - I am using M in the advanced editor to try and make a dynamic date range. Ideally, I would like to go back 13 months from today's date, but just at the month level.
For example, today is May 28th, 2019, I want the date range to be April 1, 2018 - May 28 2019, and on June 1st, the date would change to May 1 2018 - June 1 2019, etc, etc. I cannot figure out the syntax.
Use Date.StartOfMonth and Date.AddMonths
Date.AddMonths(Date.StartOfMonth(Date.From(DateTime.LocalNow())), -13)
Hi,
Which data source are you using? Don't you have a Date Dimension? Then it's very simple with SQL.
Select * from DIM_DATE
WHERE date >= select dateadd(mm, datediff(mm, 0, @ThisDate) - 13, 0) -- Beginning of 13 months ago
Hi - This is not in SQL. I am actually connecting through the Adobe Analytics API, so it has to be done in the Advanced Editor.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 45 | |
| 38 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 86 | |
| 70 | |
| 39 | |
| 29 | |
| 27 |