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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
pva
Frequent Visitor

Calculate the average of last sprints

Hello everyone

 

I have a table where I want to show the average speed of the last sprints of the selected project. I mean, in sprint 1 in want to show 0 as there are not previous sprints, in sprint 2 I want to show the average of the sprint 1, in sprint 3 i want to show the average of sprint 1 and 2 and so on. The table should look like this:

 

Sprint NumberSpeedAvg Speed
140
284
396 -> (8+4)/2
467 -> (9+8+4)/3

 

Any idea?

 

Thank you very much!!

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@pva  you can write a measure like this

Measure =
IF (
    MAX ( 'Table'[Sprint Number] ) = 1,
    0,
    CALCULATE (
        AVERAGE ( 'Table'[Speed] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Sprint Number] < MAX ( 'Table'[Sprint Number] )
        )
    )
)

 

smpa01_0-1639592771696.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

2 REPLIES 2
smpa01
Super User
Super User

@pva  you can write a measure like this

Measure =
IF (
    MAX ( 'Table'[Sprint Number] ) = 1,
    0,
    CALCULATE (
        AVERAGE ( 'Table'[Speed] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Sprint Number] < MAX ( 'Table'[Sprint Number] )
        )
    )
)

 

smpa01_0-1639592771696.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
pva
Frequent Visitor

@smpa01 thanks a lot!!! It worked perfectly! 

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.