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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Add Average of selected rows as a new column

hi there,

 

I would like to add an extra column calculating average of highlighted rows, however I can only add average of the columns.

 

Such function is available in excel, how should I achieve this in Power BI?

chenxi_0-1660143588436.png

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

You have to sum the values and divide by the number of columns in Dax. If the table has a large number of columns, it is not recommended to use dax for the calculation of the row average. Please try to add custom column in Power query.

1. Select the columns that needs to be operated

2. 'Add Column' ->'Statistics' ->'Average'

veasonfmsft_0-1660891803893.png

Result:

veasonfmsft_1-1660892011823.png

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

You have to sum the values and divide by the number of columns in Dax. If the table has a large number of columns, it is not recommended to use dax for the calculation of the row average. Please try to add custom column in Power query.

1. Select the columns that needs to be operated

2. 'Add Column' ->'Statistics' ->'Average'

veasonfmsft_0-1660891803893.png

Result:

veasonfmsft_1-1660892011823.png

Best Regards,
Community Support Team _ Eason

jcalheir
Solution Supplier
Solution Supplier

Hi

 

You can use AVERAGEX to do across multiple columns

https://docs.microsoft.com/pt-pt/dax/averagex-function-dax

 

Kind regards,
José
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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