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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Rolling Average of Sum with non date field

Hi There,

I'm struggling to get this moving average working. I have a data set that looks like this

TeamStory pointsSprint
PBI3215
BPI5215
BPI3216
PBI7216
etcetcetc


I need the rolling average over 4 sprints of the sum of story points completed each sprint. I tried the following measure but it is not returning an accurate value.

 

 

 

Velocity Rolling 4 = 
CALCULATE(
    AVERAGEX('Fact Delivery Data',SUM('Fact Delivery Data'[Story Points])),
    FILTER(ALL('Fact Delivery Data'),
    'Fact Delivery Data'[Sprint]>=MAX('Facts Delivery Data'[Sprint])-3 
    && 'Fact Delivery Data'[Sprint]<=(MAX('Fact Delivery Data'[Sprint])
    )
    )
)

 

 

 

 
Any help would be really appreciated, I'm super stuck with this one

1 ACCEPTED SOLUTION
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Please let me know if you'd like to below one:

var b = MAX( 'Fact Delivery Data'[Sprint] ) 
VAR a =
 b - 3
 
RETURN
 CALCULATE (
 AVERAGEX ( 'Fact Delivery Data', SUM ( 'Fact Delivery Data'[Story Points] ) ),
 FILTER (
 ALL ( 'Fact Delivery Data' ),
 'Fact Delivery Data'[Sprint] >= a
 && 'Fact Delivery Data'[Sprint] <= b
 )
 )

3.PNG

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Please let me know if you'd like to below one:

var b = MAX( 'Fact Delivery Data'[Sprint] ) 
VAR a =
 b - 3
 
RETURN
 CALCULATE (
 AVERAGEX ( 'Fact Delivery Data', SUM ( 'Fact Delivery Data'[Story Points] ) ),
 FILTER (
 ALL ( 'Fact Delivery Data' ),
 'Fact Delivery Data'[Sprint] >= a
 && 'Fact Delivery Data'[Sprint] <= b
 )
 )

3.PNG

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
v-diye-msft
Community Support
Community Support

hi @Anonymous 

 

Sorry  I am a little confused about your requirement based on your measure, could you please disclose the expected results?

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Hi @v-diye-msft ,


I'm after a 4 sprint (period) rolling average of story points.

For instance, the sum of all points for sprint 1 was 4000, sprint 2 3000, sprint 3 3500, sprint 4 3000. The expected result is the average across these 4 sprints

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.