Forum Discussion
smpa01
1 year agoCommunity Champion
Parametrize columns
I am having issue to pass on columns as parameter for a function callback
Non function version
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTJSit...
- 1 year ago
I think this is what you are intending to do.
let Source = Table.FromRows({{1,2},{2,3},{3,4}}, type table[colA = Int64.Type, colB = Int64.Type]), fx = (tbl as table, filterCol as text) as table => Table.SelectRows(tbl, (_) => Number.IsEven(Record.Field(_, filterCol))), filter = fx(Source, "colB") in filter
PwerQueryKees
1 year agoSuper User
filtercol as record is the problem. try changing to any.