I think Excels FILTER function is great, especially when combined with SORT, CHOOSECOLS and so on.
What I did not even manage to google, let alone find a solution for is: can I "paste" a calculated columns to the results of FILTER function.
For example:
I have the original data on the left, I want to FILTER the rows where a person had passed a test and then for example COUNT how many times have they passed a test.
It is just an example, it can be how many exams have they took in the first trimester, analogously it could be the total amount billed if you look at customer invoices and so on.
The column with the yellow title is the column that I want "pasted", i.e. calculated.
I could do FILTER and then add formulas in the last column as I did here. But it does not adapt to number of rows being filtered, as below (if Carol passed one test less for example).
How to do it or is it for some reason better to do it fundamentally in another way?

