Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Guy1980
New Member

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 3
Ashish_Mathur
Super User
Super User

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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)

 

IdleIdle

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


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors