"That" and "which" are never interchangeable! The word "that" is used when the phrase that it starts can not be omitted from a sentence that contains it.
The word "which," which can be very useful, starts a phrase that can be omitted from a sentence without changing its meaning, and is almost always preceded by a comma.
Neither of your examples are complete sentences, but they can be illustrative:
He must analyze the circuits that function as filters.
Means that it is specifically those circuits that function as filters that it is he must analyze.
He must analyze circuits, which function as filters.
Means he will be analyzing circuits, and those circuits also happen to function as filters.