Forum Discussion
rlclynn
Apr 26, 2024Copper Contributor
Filter 2 columns at the same time in a table
Hi. Newbie here! I have been trying to figure out how to filter two columns at the same time. In this instance, I want to filter the "SPLIT SALES" and "SPLIT SALES 2" columns by "HIPPKE". Essentially...
PeterBartholomew1
Apr 27, 2024Silver Contributor
= LET(
nonblanks, FILTER(selected, ISTEXT(selected)),
criterion, BYROW(SalesPeople, LAMBDA(names, OR(names=nonblanks))),
FILTER(Table1, criterion)
)
The first line guards against the list of selected salespeople containing blank fields.
The second takes the fields containing the names of salespeople associated with the transaction and compares them to the list of non-blank selections to give a 2D array. If there is a match the criterion for that record will be set to TRUE.
Finally, the table is filtered.