If you filter col B on "B" (or whatever item you like), you can use

=SUBTOTAL(7, Total)