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 have a table having MonthYr and Value as mentioned below and I wanted to calculate Moving Average as mentioned expected output.
Moth Yr Value Expected output
Feb-16 14
Mar-16 21 17.5
Apr-16 11 16
May-16 43 27
Jun-16 17 30
Jul-16 19 18
Aug-16 31 25
Sep-16 23 27
Oct-16 12 17.5
Solved! Go to Solution.
Hi, @Anonymous
Add a calculated column in table
CountRows2 = 1
Create measures following the below formulas:
RunningRows =
CALCULATE (
SUM ( 'Moving Agerage'[CountRows2] ),
FILTER (
ALL ( 'Moving Agerage' ),
'Moving Agerage'[MonthYr] <= MAX ( 'Moving Agerage'[MonthYr] )
)
)
RunningTotal =
CALCULATE (
SUM ( 'Moving Agerage'[Value] ),
FILTER (
ALL ( 'Moving Agerage' ),
'Moving Agerage'[MonthYr] <= MAX ( 'Moving Agerage'[MonthYr] )
)
)
MovingAverage = [RunningTotal]/[RunningRows]Best regards,
Yuliana Gu
Hi, @Anonymous
Add a calculated column in table
CountRows2 = 1
Create measures following the below formulas:
RunningRows =
CALCULATE (
SUM ( 'Moving Agerage'[CountRows2] ),
FILTER (
ALL ( 'Moving Agerage' ),
'Moving Agerage'[MonthYr] <= MAX ( 'Moving Agerage'[MonthYr] )
)
)
RunningTotal =
CALCULATE (
SUM ( 'Moving Agerage'[Value] ),
FILTER (
ALL ( 'Moving Agerage' ),
'Moving Agerage'[MonthYr] <= MAX ( 'Moving Agerage'[MonthYr] )
)
)
MovingAverage = [RunningTotal]/[RunningRows]Best regards,
Yuliana Gu
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 | |
| 49 | |
| 33 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 85 | |
| 70 | |
| 38 | |
| 28 | |
| 25 |