Forum Discussion

n5722's avatar
n5722
Helper I
5 years ago
Solved

Average or relative weeks

Hello,   I am looking for a way to stabilise the rate fluctuations on the graph (see pic below). As you can see the graph shows rates for the past 12 weeks (purple line). I am using relative wee...
  • V-lianl-msft's avatar
    5 years ago

    Hi n5722 ,

     

    Please try to create a measure like below:

    Measure = 
    var current_week = SELECTEDVALUE(Sheet3[week])
    return 
    CALCULATE(
        AVERAGE(Sheet3[rates]),
        FILTER(ALL(Sheet3),
            Sheet3[week]>=current_week-12&&
            Sheet3[week]<=current_week))

     

     

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