cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper I

## Create new column which is an average of values in other column

Hi Guys,

I am new to Power Bi and need help with creating a column which should do an average of other 4 columns for every row.
Attaching a screenshot for reference:

So, basically want to create a new column - let's call it Average.

So, Average = average of (0.6686+0.66+0.6616+0.6664)  //taking example of 2nd row

2 ACCEPTED SOLUTIONS
Super User

Hi @SJHALANI , you can add this column Power Query in the "Add column" tab and then "Custom Column" like so:

In the pop-up window you can add the following code:

``( [field_16] + [field_17] + [field_18] + [field_19] ) / 4 ``

If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

Super User

Hi @SJHALANI ,

The answer provided by @goncalogeraldes will work for the most part.

However, I would recommend using List.Average instead as this will correctly handle null values if they occur in your columns:

``List.Average( { [field_16], [field_17], [field_18], [field_19] } )``

Pete

Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!

2 REPLIES 2
Super User

Hi @SJHALANI ,

The answer provided by @goncalogeraldes will work for the most part.

However, I would recommend using List.Average instead as this will correctly handle null values if they occur in your columns:

``List.Average( { [field_16], [field_17], [field_18], [field_19] } )``

Pete

Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!

Super User

Hi @SJHALANI , you can add this column Power Query in the "Add column" tab and then "Custom Column" like so:

In the pop-up window you can add the following code:

``( [field_16] + [field_17] + [field_18] + [field_19] ) / 4 ``

If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors