Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.