Forum Discussion
Filtering Data
This differs more in style than substance. First, because I would never use a direct cell reference I name the data, headers and row-headers 'marks', 'subjects' and 'students' respectively. The formula I used is given by
= LET(
Sumλ, LAMBDA(x, SUM(x)),
fails, SIGN(marks<threshold),
countFails, BYROW(fails, Sumλ),
FILTER(students, countFails)
)
The first line defines the Lambda function 'Sumλ' for later use. I could have used a defined name or simply used the anonymous Lambda function. The next line works on the entire array of marks, returning 1 for any fail. MMULT is a very fast and effective function but is somewhat mathematical so I chose to use the modern Lambda helper function BYROW to present the rows for summation one by one. Finally, filter is used to remove the student names that have no failed subjects.
- MYDec 24, 2022Brass Contributor
Great use of Lambda to solve the problem Peter - nice and easy to follow.
I wish I could learn and propose answers using Lambda but my version of Excel is on semi-annual enterprise and the company does not have access to Lambda functions; plus my co-workers would not have a clue as to how to review my work!
- PeterBartholomew1Dec 24, 2022Silver Contributor
Your company may well need some more IT oriented staff to test the new functionality before it is released company-wide. Your IT department / person could set one or two of you up with the insiders beta version. I believe that to use the new functionality effectively requires 'retraining one's brain'.