Forum Discussion

yogeshk77's avatar
yogeshk77
Helper I
2 years ago
Solved

Conditional Rolling Average

I have below mentioned Power BI table structure Table   WeightedVel table contains below columns “Team_10202” as a String Data type “Reporting Sprint ID” as an Integer Data type “Story_Point...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  yogeshk77 ,

     

    Here are the steps you can follow:

    1. Create calculated column.

    rank =
    RANKX(
        FILTER(ALL(Expected),
        'Expected'[Team]=EARLIER('Expected'[Team])),[Reporting Sprint ID],,DESC)
    Sum of Six Period Average =
    IF(
        [rank] <=6,
        AVERAGEX(
            FILTER(ALL('Expected'),
            'Expected'[Team]=EARLIER('Expected'[Team])&&
            'Expected'[rank]>=EARLIER('Expected'[rank])&&'Expected'[rank]<=EARLIER('Expected'[rank])+5),[Story_Points])
    
    )

    2. Result:

     

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly