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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors