I have a nice report built that shows my capital projects and whether or not they are "at risk" based on a number of criteria. The list is at the detailed level (one line per project). I would like to be able to summarize that list up to a Portfolio level to use in a bar chart to show At Risk project counts by Portfolio, and also summarized to the top level to show one At Risk number as a KPI.
Evaluating whether or not a project is At Risk is not done within the backing table, though, so it's not quite as simple as just grouping the table at the right level. I had to use YTD and Annual functions to create synthetic fields in my report table in order to get the numbers I needed for comparing actual spend vs planned spend and then flagging the project accordingly.
Ultimately, I end up with a report that looks something like this:

where the Approved Amount is the total amount that the project is approved to spend, which can span multiple years; and the Project is At Risk if any of the 3 calculated criteria are Yes.
For purposes of my At Risk report, I only care about projects that are >$100, so i want to be able to filter this table on At Risk=Yes, and Approved Amt>=100 and then summarize it by Portfolio so that it looks like this:

However, as soon as I group by Portfolio, all of the amounts get summarized up into one number and then the filter is applied after the summarization. Similarly, all three of the calculated criteria are summarized and the the At Risk column calculates based on the summarized criteria for the Portfolio. So it summarizes the report first and then filters it, and it ends up looking like this instead:

What I need is to be able apply my filters to the lower level and still be able to report at the higher level. Is there a way to do this?