Hello all,
Complete new to this, but trying to figure it out
I have this code/:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Custom", each let
last4ColumnValues = List.LastN(Record.FieldValues(_),4),
result = List.Average(List.Select(last4ColumnValues, each _<>0))
in
result)
What I need is to be able to select the different columns for which i want the average calculated...
and those aren't the last N columns prior to this one.
Actually I 'simply' need a power query alternative for =AVERAGEIF(B2:B5,">0")
Have been looking and puzzling for some hours now, but I raise the white flag...
Can anyone help me out? Would be very much appreciated.
Complete new to this, but trying to figure it out
I have this code/:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Added Custom" = Table.AddColumn(Source, "Custom", each let
last4ColumnValues = List.LastN(Record.FieldValues(_),4),
result = List.Average(List.Select(last4ColumnValues, each _<>0))
in
result)
What I need is to be able to select the different columns for which i want the average calculated...
and those aren't the last N columns prior to this one.
Actually I 'simply' need a power query alternative for =AVERAGEIF(B2:B5,">0")
Have been looking and puzzling for some hours now, but I raise the white flag...
Can anyone help me out? Would be very much appreciated.