March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.