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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
LeylaD
Frequent Visitor

Average per Year

Hello All, 
I have created 

AvgAmount =
AVERAGEX(ALL('Calendar'[Date].[Year]),Calculate(AVERAGEX(Values('Calendar'[Date].[Year]),[Amount])))

But the problem is that I have a year filter on the visual and this formula doest take that into concideration. 
The average is lower as if for all the years in the calendar, what shall i adjust to exclude those years?
Thank you.
1 ACCEPTED SOLUTION
olgad
Super User
Super User

Hi there,

try changing ALL to ALLSELECTED to take the filter into account. 


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

View solution in original post

2 REPLIES 2
LeylaD
Frequent Visitor

that was it, thanks

olgad
Super User
Super User

Hi there,

try changing ALL to ALLSELECTED to take the filter into account. 


DID I ANSWER YOUR QUESTION? PLEASE MARK MY POST AS A SOLUTION! APPRECIATE YOUR KUDO/LIKE!
PROUD TO BE A SUPER USER!
Best Stories, Interesting Cases: PowerBI Storytime Newsletter
Linkedin Profile: Linkedin
YouTube Channel: PowerBI Storytime

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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