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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bsrujan022
New Member

Automated row for averages in Power Query

Hi there, so my question is that in power query is there a way for me to get a new column that shows the average of values in a row? The number of columns will be updated on a daily basis. So, would need the average column to be updated on a daily basis.  

 

For eg: 

bsrujan022_0-1674092623060.png

 

We have a table here, say just 4 columns of data as of now and 5th column being average of 4 columns on a row wise representation. What if tomorrow, another column comes in between Jan 4 & average column. I need a way for it to automate this and give me row wise data whenever a new column is added. 

 

This image is just an example from normal excel, but my data is processed in Query, of course can't show the photo since data is sensitive. Once processed within Power query, I have it loaded into a Pivot table. So, it makes crucial for me to have data set in exact same format. what can be done?

1 REPLY 1
BA_Pete
Super User
Super User

Hi @bsrujan022 ,

 

Try this as a new custom column:

List.Average( List.RemoveFirstN( Table.ColumnNames(previousStepName), 1)) 

 

Pete 



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

Proud to be a Datanaut!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 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.