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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
amethyst_tang_2
Frequent Visitor

how to find average

hi i would like to find out the average profit of each genre for the past 10 years . 

i have done power BI features like :
using calculate, sum and filter to found out about the sum of gross that year.

i am now looking for ways to find the average of this, how can i do that?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amethyst_tang_2 ,

Try this DAX to create a measure:

Measure = AVERAGEX(
    FILTER(
        ALL('Table'),
        'Table'[Released_Year] >= 2010 && 'Table'[Released_Year] <= 2020
    ),
    'Table'[Gross]
)

And the final output is below:

vjunyantmsft_0-1706757158628.png

Or you can build a slicer to filter the data from 2010 to 2020:

vjunyantmsft_1-1706757194234.png

And now you can just use this DAX to calculate:

Measure 2 = AVERAGE('Table'[Gross])

The output will change dynamically according to the slicer you select:

vjunyantmsft_2-1706757338941.png
vjunyantmsft_3-1706757349910.png

 

 Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @amethyst_tang_2 ,

Here is my sample data:

vjunyantmsft_0-1706671464519.png

I use this DAX to create a new measure:

Average Profit by Genre = 
CALCULATE(
    AVERAGE('Table'[profit]),
    FILTER(
        ALL('Table'[Year]),
        'Table'[Year] > YEAR(NOW()) - 10
    )
)

The final output is like below:

vjunyantmsft_1-1706671514580.png

If your data table contains only the first 10 years of data, then the DAX only needs to be simplified to:

Average = AVERAGE('Table'[profit])


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Idrissshatila
Super User
Super User

Hello @amethyst_tang_2 ,

 

can you provide a sample data so we could help you.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




https://docs.google.com/spreadsheets/d/17_iuqyIl3fk_xfUkgb9fQ-9tJKvwkYvG/edit?usp=sharing&ouid=11727...

hi the dataset link is here. in summary, i would like to filter out the "released year" to the latest 10 years (2010 to 2020) and find the average of of the gross from 2010 to 2020. 

 

 

hi sample data

Anonymous
Not applicable

Hi @amethyst_tang_2 ,

Try this DAX to create a measure:

Measure = AVERAGEX(
    FILTER(
        ALL('Table'),
        'Table'[Released_Year] >= 2010 && 'Table'[Released_Year] <= 2020
    ),
    'Table'[Gross]
)

And the final output is below:

vjunyantmsft_0-1706757158628.png

Or you can build a slicer to filter the data from 2010 to 2020:

vjunyantmsft_1-1706757194234.png

And now you can just use this DAX to calculate:

Measure 2 = AVERAGE('Table'[Gross])

The output will change dynamically according to the slicer you select:

vjunyantmsft_2-1706757338941.png
vjunyantmsft_3-1706757349910.png

 

 Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@amethyst_tang_2 Well in theory you just replace the SUM or SUMX function in your formulas with AVERAGE or AVERAGEX. Otherwise, not enough detail to really provide a solution. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.