Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

calculate 3-sprint rolling average for throughput

Hi there!

 

May I know how I can get a 3-sprint rolling average of througput from table structure below?

Throughput = sum of user story and bug per sprint

Example:

Sprint 10 = 3TP (2US + 1B)

Sprint 11 = 1TP (1US)

SPrint 12 = 2TP (1US + 1B)

Sprint 13 = 2TP (1US + 1B); therefore, for sprint 13, rolling average is 2 = ((Sprint10+11+12 TPs)/3)

 

SprintWork Item Type
Sprint 10User Story
Sprint 10Bug
Sprint 10User Story
Sprint 11User Story
Sprint 12User Story
Sprint 12Bug
Sprint 13User Story
Sprint 13Bug

 

I created a new table with query:

WorkItems =
Var RawWorkItems = GROUPBY('MyWorkItems','MyWorkItems'[Iteration Path], 'MyWorkItems'[Work Item Type], "Total", COUNTX(CURRENTGROUP(), 1))
Return
RawWorkItems

 

Iteration PathWork Item TypeTotal
Sprint 10User Story2
Sprint 10Bug             1
Sprint 11User Story1
Sprint 11Bug0
Sprint 12User Story1
Sprint 12Bug1
Sprint 13User Story1
Sprint 13Bug1

 

However, I want to add 3-sprint rolling average row for each sprint like below so I can properly plot them in my chart:

 

SprintDataTotal
Sprint 10User Story2
Sprint 10Bug             1
Sprint 10Rolling Ave.3=(sprint9(UserStoryandBugs)+sprint8+sprint7)/3
Sprint 11User Story1
Sprint 11Bug0
Sprint 12User Story1
Sprint 12Bug1
Sprint 13User Story1
Sprint 13Bug1
Sprint 13Rolling Ave.2 = (sprint12+sprint11+sprint10)/3

 

1 ACCEPTED SOLUTION
daxer-almighty
Solution Sage
Solution Sage

First of all, you have to have a column that numbers your sprints consecutively in order to be able to move among them. Then it's rather easy:

 

[3-Sprint Avg] =
var AverageOverCount = 3
var MaxSprintNo = MAX( Sprints[SprintNo] )
var SprintNoStart = MaxSprintNo - AverageOverCount
var Result =
    calculate(
        countrows( Sprints ) / AverageOverCount,
        SprintNoStart <= Sprints[SprintNo],
        Sprints[SprintNo] < MaxSprintNo,
        REMOVEFILTERS( Sprints[Sprint Name] )
    )
return
    Result

 

View solution in original post

2 REPLIES 2
daxer-almighty
Solution Sage
Solution Sage

First of all, you have to have a column that numbers your sprints consecutively in order to be able to move among them. Then it's rather easy:

 

[3-Sprint Avg] =
var AverageOverCount = 3
var MaxSprintNo = MAX( Sprints[SprintNo] )
var SprintNoStart = MaxSprintNo - AverageOverCount
var Result =
    calculate(
        countrows( Sprints ) / AverageOverCount,
        SprintNoStart <= Sprints[SprintNo],
        Sprints[SprintNo] < MaxSprintNo,
        REMOVEFILTERS( Sprints[Sprint Name] )
    )
return
    Result

 

Anonymous
Not applicable

Thank you for this! 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors