This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hi!
I'm trying to do something I feel like should be simple, I'd like to find the rolling average of our bookings for the last 3, 6 and 12 months. I imagine it would be something along this but I don't know what date formula to use in order to look back the 3, 6, and 12 months. any help would be appreciated!
Solved! Go to Solution.
try this @JL2007
Hi @JL2007
SQLBI actually has a very good explanation on how to achieve this using DATESINPERIOD and AVERAGEX.
https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
Hi,
Assuming Bookings is a measure that you have already written, write this measure
Rolling 3 months average booking = averagex(Summarize(calculatetable(calendar,datesbetween(calendar[date],edate(min(calendar[date]),-2),max(calendar[date]))),calendar[year],calendar[month name],"A",[bookings]),[A])
To your visual, ensure that you drag Year and Month name from the Calendar table.
Hope this helps.
Hi @JL2007 please try this
3M_Bookings_HR =
CALCULATE(
AVERAGEX(
VALUES('Date'[Month Number]),
SUM(Bookings[Contract Direct Labor])
),
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]),
-3,
MONTH
)
)
Thanks, it's giving me the total for the last 3 months, and not the average, I'd expect it to be $7,079,700 as the average not $21,239,101 for February
try this @JL2007
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 26 | |
| 22 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 45 | |
| 43 | |
| 41 | |
| 21 | |
| 20 |