Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

3 Year Average per Month

Hi All,   I am trying to work out an average of X Value over the previous 3 years, not including the current year, by month and then filter by site. In my actual data I have 30+ sites. My tabl...
  • suparnababu8's avatar
    1 year ago

    Hi Anonymous 

     

    Try with this measure

    AverageWindspeedLast3Years = 
    CALCULATE(
        AVERAGEX(
            VALUES('Table'[Date]),
            'Table'[Average Windspeed]),
        FILTER(
            'Table',
            'Table'[Year] < YEAR(TODAY()) &&
            'Table'[Year] >= YEAR(TODAY()) - 3),
        ALLEXCEPT('Table', 'Table'[Site], 'Table'[Month], 'Table'[Month No])
    )

     

    Let me know if it works