The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Please help me how can I achieve this using Power query. Thanks!
Solved! Go to Solution.
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
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
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
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
Proud to be a Datanaut!
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
Proud to be a Datanaut!
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
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
180 | |
52 | |
39 | |
27 | |
25 |