Forum Discussion
smpa01
Community Champion
2 years agoPassing on a dynamic filter table to a join
AlexisOlson ImkeF CNENFRNL
How can I pass on a dynamic filter tbl to a join.
This is currently I am doing
let
src=#table({"yr", "category","data"}, {{2023, "fed", #tab...
- 2 years ago
What about this?
= Table.NestedJoin(target, {"Year", "mo"}, Table.Combine(src[data]), {"yr", "month"}, "target", JoinKind.LeftOuter)or this:
= Table.NestedJoin(target, {"Year", "mo"}, Table.Combine(Table.SelectRows(src, each [category]="fed")[data]), {"yr", "month"}, "target", JoinKind.LeftOuter)But maybe I still don't understand what do you exactly need. Sorry for that.
smpa01
Community Champion
2 years agodufoq3 the "fed" filter makes this avaialbale to the join, but on top of this, I need to filter this table where [yr]=[Year] coming from the row context of the left table
dufoq3
Community Champion
2 years agoWhat about this?
= Table.NestedJoin(target, {"Year", "mo"}, Table.Combine(src[data]), {"yr", "month"}, "target", JoinKind.LeftOuter)
or this:
= Table.NestedJoin(target, {"Year", "mo"}, Table.Combine(Table.SelectRows(src, each [category]="fed")[data]), {"yr", "month"}, "target", JoinKind.LeftOuter)
But maybe I still don't understand what do you exactly need. Sorry for that.