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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

New Column that Returns Averages Based on Values from Two Columns

I'd like to add a column that takes the average of the values, given the values in another column.

So in the example I have here, it would return the average value for every DRR (x) every CMV (y) and every HGM (z)Untitled.png

 Thanks for your help!

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous,

 

You should add the following measure / calculated column to your model.

 

average =
CALCULATE ( AVERAGE ( Table1[Value] ); ALLEXCEPT ( Table1; Table1[COMM] ) )

The result is below as you can see as a measure or as a column it works the same way. Best practice advise to add as a measure and not a column.

 

Adding the column to a table visual it will sum up the values as if you make a measure it makes the average of the values.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Anonymous,

 

You should add the following measure / calculated column to your model.

 

average =
CALCULATE ( AVERAGE ( Table1[Value] ); ALLEXCEPT ( Table1; Table1[COMM] ) )

The result is below as you can see as a measure or as a column it works the same way. Best practice advise to add as a measure and not a column.

 

Adding the column to a table visual it will sum up the values as if you make a measure it makes the average of the values.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors