Do you have a sample packaged workbook to share with the community to assist. We need to see the data and view pane to have a better idea of the subtotal row and hiding the headings.
I would check the following discussion on the Tableau Community about this topic: How to hide some subtotals but not all?
For hiding a specific subtotal header. Information can be found in this discussion: Able to hide row subtotals for a specific value of a Category dimension after filtering? (Desktop 9.2.6)
Hope this helps!