The filter expression would be:
Month ( PO Database::Date ) = Total for Month::Month AND Year ( PO Database::Date ) = Total for Month::Year
I am assuming that the portal is based on PO Database and that the layout is based in Total for Month.
I would define the relationship between the two table occurrences as:
Total for Month::Year X PO Database::anyfield AND
Total for Month::Month X PO Database::anyfield
By including the Year and Month fields in the relationship and using the X cartesian join operator instead of =, the portal will update automatically each time you select a different month and/or year in the year and month fields.
To get a total of just the filtered records, define a Summary field in PO Database that totals the field from which you want a total. Put this summary field in a one row portal to PO Database with exactly the same filter expression as the first portal. (You can give the portal's borders a transparent color or zero line width to hide the fact that this field is actually in a portal.)