Computing Header Totals in Tableau

I recently got an email from a former student explaining that they were trying to recreate something similar to the image below in Tableau.

The trouble she was running into was recreating the total header called “Planned Cost by Perf”. If you try to use a measure as a discrete header, you end up with the value summed for each partition. Here is an example using Superstore data: