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
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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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