Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I'm trying to compare 13 week averages and get the % change.
I have a table with all my values by date. I then have a table with date and 13 week period.
I am able to relate date with date and get averages by 13 week period but I cannot figure out how to compare to the previous period. I created an index column in my attempt.
The logic I'm thinking is MEASURE = ((AVERAGE(VALUE), INDEX) - (AVERAGE(VALUE), INDEX - 1 )) / (AVERAGE(VALUE), INDEX - 1)
I'm not sure if I'm on the right track or how to accomplish this. Thanks in advance!
(Acomplishing this with a filter value works but is undesirable)
Solved! Go to Solution.
@Anonymous
I believe you are having the right logic, I create the demo of Running Average, if you want average to a specific index, just change the filter to <=13, and <13.
Measure=
var currentaverage = CALCULATE(AVERAGE([Value]),FILTER(ALL('Table'),MAXX(FILTER('Table',EARLIER('Table'[Index])<=[Index]),'Table'[Value])))
var previousaverage = CALCULATE(AVERAGE([Value]),FILTER(ALL('Table'),MAXX(FILTER('Table',EARLIER('Table'[Index])<[Index]),'Table'[Value])))
Return (currentaverage - previousaverage) / previousaverage
Best,
Paul
@Anonymous
I believe you are having the right logic, I create the demo of Running Average, if you want average to a specific index, just change the filter to <=13, and <13.
Measure=
var currentaverage = CALCULATE(AVERAGE([Value]),FILTER(ALL('Table'),MAXX(FILTER('Table',EARLIER('Table'[Index])<=[Index]),'Table'[Value])))
var previousaverage = CALCULATE(AVERAGE([Value]),FILTER(ALL('Table'),MAXX(FILTER('Table',EARLIER('Table'[Index])<[Index]),'Table'[Value])))
Return (currentaverage - previousaverage) / previousaverage
Best,
Paul
I modified it slightly to :
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 38 | |
| 31 | |
| 30 |