I have this table (there columns I need):
I need to replace null values in original_eur column with median value for each group (group columns are event_id and category).
let
Source = Csv.Document(File.Contents("E:\Kwork\Copy_Ticombo_parse_data.csv"),[Delimiter=";", Columns=40, Encoding=1251, QuoteStyle=QuoteStyle.None]),
#"Upper heads" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed types" = Table.TransformColumnTypes(#"Upper heads",{{"Name", type text}, {"id", type text}, {"entity_id", type text}, {"competition_name", type text}, ... etc }),
#"Add column with median values" = Table.AddColumn(#"Changed types", "median_values", each Table.SelectRows(
Table.Group(
#"Changed types",
{"event_id", "category"},
{"median", each List.Median(_[original_eur]), Int64.Type}
),
each _ = [event_id = "event_id", category = "category"]
))
in
#"Add column with median values"
At last step:
1) I make grouped table with medians;
At this stage all works.
But how select right value for each row?

Report
All responses (
Answers (