Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
Need your support.
I want to calculate moving/rolling average value of a KPI for the last 4 weeks average values using DAX.
I have simply calculated the values in excel for the reference and attached the Snapshot as well.
Please consider the values and help to get the desired ouput.
Solved! Go to Solution.
You'll need a week commencing column on your date table, or something similar, then
Weekly Avg =
VAR currentWC =
MAX ( 'Date'[W / C] )
VAR startDate = currentWC - 35
VAR endDate = currentWC - 1
RETURN
AVERAGEX (
ADDCOLUMNS (
CALCULATETABLE (
SUMMARIZE ( 'Date', 'Date'[W / C] ),
DATESBETWEEN ( 'Date'[Date], startDate, endDate )
),
"@val", [Measure]
),
[@val]
)
You'll need a week commencing column on your date table, or something similar, then
Weekly Avg =
VAR currentWC =
MAX ( 'Date'[W / C] )
VAR startDate = currentWC - 35
VAR endDate = currentWC - 1
RETURN
AVERAGEX (
ADDCOLUMNS (
CALCULATETABLE (
SUMMARIZE ( 'Date', 'Date'[W / C] ),
DATESBETWEEN ( 'Date'[Date], startDate, endDate )
),
"@val", [Measure]
),
[@val]
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 193 | |
| 124 | |
| 101 | |
| 67 | |
| 49 |