Forum Discussion

Guy1980's avatar
Guy1980
New Member
4 years ago

Filterable Average based on previous year values

Hi, I am trying to show a graph with this year vs last year average (straight line for last year)

 

I have managed to get the below measure to show correctly but by using ALL in the measure the page filters do not work on it.

 

I filter the data further by depot and asset type which is ignored in this way.  If I change the filter to not have ALL, it doesn't give me a straight line anymore but an average per week which is not what I am after (need an average over the year - same each week but filtered by the page filters)

 

AVG Gal =
CALCULATE(
AVERAGE('Microlise Data'[Fuel UsedGal(s)]),
FILTER(
ALL(TheDate[Date]),
YEAR(thedate[DATE]) = 2021))
 
 

3 Replies

    • Guy1980's avatar
      Guy1980
      New Member

      The data is split across multiple tables but basically idling gallons summed for the previous year then split over weeks as the years average with this years as the actual week values like in the image below but with the previous years average filterable (ability to filter by specific depots)

       

      Idle

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Sorry but I am still unable to understand your question.  Someone else who does will help.