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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.