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! Learn more

Reply
xariet
Helper I
Helper I

Calculating Average

Hi All, I need to do a very simple calculation, but I am stuck. Please help. I need to see in the table the countries, years, and average per country across all years. I have tried different variations of DAX but can't come up with the correct answer. For example, for Austria, I want to see 20,290.5 across all years.

xariet_0-1690507314594.png

 

 

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @xariet 

Try :

average over years =
CALCULATE(
    AVERAGE('table'[Sum]),
    ALLEXCEPT('table', 'table'[Country])
)
Ritaf1983_0-1690513778389.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Thank you @Ritaf1983 , but using your formula I still get incorrect numbers

xariet_0-1690514263224.png

 

View solution in original post

6 REPLIES 6
Ritaf1983
Super User
Super User

Hi @xariet 

Try :

average over years =
CALCULATE(
    AVERAGE('table'[Sum]),
    ALLEXCEPT('table', 'table'[Country])
)
Ritaf1983_0-1690513778389.png

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you @Ritaf1983 , but using your formula I still get incorrect numbers

xariet_0-1690514263224.png

 

Hi @xariet 

Please attach your data table in a format that it is possible to work with ( not a picture and not a visual, data from data view) and I will check it

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Unfortunately I don't have an option to attach files here...

You can save it on one drive and attach a link :

Ritaf1983_0-1690516186596.png

or just pase a table :
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ashish_Mathur
Super User
Super User

Hi,

Assuming the Year column is from the Calendar Table, write this measure

Avg = averagex(allexcept(Calendar,Calendar[Year]),[sum_sales])

Ensure that there is relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table.

Hope this helps.


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