Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hey guys, I'm studying Power Query but I'm stuck
I have a column "Age" with some null values, I want to replace those with the average.
That's what I try to do:
I don't no what I'm doing wrong, someone can help me please?
Solved! Go to Solution.
Insert this statement
= Table.ReplaceValue(#"Tipo Alterado",each [Age],each if [Age] = null then List.Average(#"Changed Type"[Age]) else [Age],Replacer.ReplaceValue,{"Age"})
Insert this statement
= Table.ReplaceValue(#"Tipo Alterado",each [Age],each if [Age] = null then List.Average(#"Changed Type"[Age]) else [Age],Replacer.ReplaceValue,{"Age"})
That's a good solution! I would actually calculate the List.Average first, make us a variable, so it'll calculate only once. So
avg = List.Average(#"Changed Type"[Column])
The in the formula, just replace the text above with avg
--Nate
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
26 | |
25 | |
24 | |
13 | |
10 |
User | Count |
---|---|
24 | |
21 | |
18 | |
17 | |
10 |