The Below is a working example of how you can use a Pivot Table to show sample types counted per geology and show the grand total for each one.
To Load this report select the Load button from the "Reports Selection Window" within the Excel Extension and then select the file downloaded using the link below.
Please contact the support team and request for the 'SampleCountByGeologywithPivotTables.xlsm' file.