Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dynamic rolling average based on slicer selection

Hello!   I have the following measure which gives me the rolling average of average sales per week:   Dynamic Rolling AVG = VAR virtual_table = SUMMARIZE ( FILTER ( ALL ...
  • v-lionel-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    Try the measures:

    Cumulative = 
    CALCULATE(
        SUM(Sheet5[AVG SALES in PCS]),
        FILTER(
            ALLSELECTED(sheet5),
            Sheet5[WEEK] <= MAX(Sheet5[WEEK])
        )
    )
    
    //If you don't have [index] column, you can add it in Edit Queries.
    Result = 
    [Cumulative]/MAX(Sheet5[Index])

     

    Best regards,
    Lionel Chen

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