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
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!
User | Count |
---|---|
103 | |
25 | |
18 | |
14 | |
11 |
User | Count |
---|---|
109 | |
32 | |
28 | |
22 | |
18 |