I don't know that you need a portal to do this. Summary fields also compute based on the current found set. If you use a find to filter your data down then your summary field will still be correct, then use this summary field in a calculation, which will also change based on your current found set.
ExecuteSQL will do the job if you have FileMaker 12 and then set it up correctly.
"One method is to set up the necessary match fields to match values at the relationship level to reproduce the set of records being totaled in your filtered portal."
Means that you will need to either change your existing relationship or create a new table occurrence that refers to your portal's table for use with a new relationship.
Say you have this relationship:
Parent::PrimaryKey = Child::ForeignKey
And you need to match to all Child records whereChild::Type = "Apple".
The following relationship would achieve that result:
Parent::PrimaryKey = Child|Apple::ForeignKey AND
Parent::constApple = Child|Apple::Type
constApple would be a calculation field with text selected as the result type and would have this exact expression:
SO that every record in Parent has the value "Apple" in the constApple field.
Child|Apple is the name of a new Tutorial: What are Table Occurrences? for the Child table so that the original relationship is left unmodified for use elsewhwere in your database.