- Primary solution is just the formulae in the yellow cells in the vicinity of cells E41:G47.
- The second solution at C54:G68 is pivot table data grabbed from the pivot table at cell Q37, which in turn is based on the table at cell B2.
- The third solution at cell A70 is a pivot table output of Power Query. To see how this has been processed, go to the Data tab of the ribbon, click on Queries & Connections in the Queries & Connections section. A pane will pop up where you will see one query, Table1, right-click and choose Edit to see the steps taken.
I won't go into further details (it takes far too long) unless you have specific questions about one or two aspects of these suggested solutions.