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!View all the Fabric Data Days sessions on demand. View schedule
Hi,
I have data like:
Name, 2024-01, 2024-02, 2024-03, etc to 2025-01
Customer a, 5,5,10,10 etc
Customer b, 10,11,11,12 etc
Customer c, 0,0,0,0....7,7 as they only have values for last 2 months
I'd like a column added that gives moving average over as many months as there is data to indicate a trend
Is that possible?
Solved! Go to Solution.
hello @RamblingFire
i might be misunderstood but please check if this accomodate your need.
1. i assumed your table looks like this based on your description above.
2. unpivot the table and rename the header if needed.
3. create a new measure with following DAX
Average =
var _Name = SELECTEDVALUE('Table'[Name])
Return
AVERAGEX(
FILTER(
ALL('Table'),
'Table'[Name]=_Name&&
'Table'[Date]<=MAX('Table'[Date])
),
'Table'[Value]
)
hello @RamblingFire
i might be misunderstood but please check if this accomodate your need.
1. i assumed your table looks like this based on your description above.
2. unpivot the table and rename the header if needed.
3. create a new measure with following DAX
Average =
var _Name = SELECTEDVALUE('Table'[Name])
Return
AVERAGEX(
FILTER(
ALL('Table'),
'Table'[Name]=_Name&&
'Table'[Date]<=MAX('Table'[Date])
),
'Table'[Value]
)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 16 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 22 | |
| 20 | |
| 17 | |
| 12 |