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
Rastelka
New Member

All Function in AverageX

Hello everyone,

 

I am new to DAX and would appreciate a bit of help. Why these two meassures produce two different results in Power BI report? Thanks a lot for any answer. 

 
(First Picture)
PriemerProdukt = AVERAGEX('Product', SUMX ( RELATEDTABLE(Sales), Sales[Quantity] * Sales[Net Price] ))
 
2023-01-13_11-12-24.png
 
(Second Picture)
PriemerALL =
AVERAGEX(ALL('Product'), SUMX ( RELATEDTABLE(Sales), Sales[Quantity] * Sales[Net Price] ))
 
2023-01-13_11-11-32.png

 

Thanks a lot. 

2 ACCEPTED SOLUTIONS
ValtteriN
Super User
Super User

Hi,

ALL removes the filter context in your calculation and because of that the row level filter context that is available in your table is removed and all rows return the same result.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

hi @Rastelka 

ALL removes the filter context in any calculattion, like AVERAGX, not only in CALCULATE function. 

In your first measure, Product table is filtered by the row filter of the table visual.

View solution in original post

4 REPLIES 4
Rastelka
New Member

Hello,

 

I thought that ALL removes the Filter Context only when it's used with Calculate. Or is that incorrect? Thanks a lot!

hi @Rastelka 

ALL removes the filter context in any calculattion, like AVERAGX, not only in CALCULATE function. 

In your first measure, Product table is filtered by the row filter of the table visual.

Thanks a lot @FreemanZ  🙂

ValtteriN
Super User
Super User

Hi,

ALL removes the filter context in your calculation and because of that the row level filter context that is available in your table is removed and all rows return the same result.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.