I've had this problem before. It's rather annoying in Excel (plug for Pandas/Python). This solution will work, but comes with a caveat that can be worked around if you're willing to use slicers.
To start, I replicated your dataset and set it up as a table:
Then I made multiple Pivot Tables, filling the Columns
and Values
Pivot Table Fields with one Category
of each of your categories. This will produce a Pivot Table with 3 rows. The first row will read Column Labels
with a filter dropdown. The second row will read all the possible values of the column. The third row will be the count of each value in the above column.
Repeat the process in the next available blank cell for the next category, which will produce something like this:
Hide the first row of the first Pivot table, and the first two rows of each of the next Pivot Tables. This will result in the data structure that you are looking for:
The caveat here is that each Pivot Table is it's own, not one Pivot Table of everything. This could slow things down on your system depending on resources, and/or be annoying to keep up with as new data points (in your case, Categories
) are added.
To filter the Pivot Table like you're looking for, try using slicers. To do this:
- Click on the first Pivot Table
- Click
Analyze
in the ribbon (menu) up top.
- Click
Insert Slicer
.
- Setup slicers for
Name
, Date
, Site
, and Supervisor
.
- Right click each slicer and look for something like
Connections
. Click this.
- It should bring up all the possible Pivot Tables in your sheet. Check each relevant Pivot Table (you might have other Pivot Tables in your workbook that don't need this slicer).
Now, every time you click on a setting of a Slicer, your Pivot Tables (remember, we did not setup one giant Pivot Table) will update.
In closing, the general approach to this is not fun. But, it works. In addition, Slicers are a great feature, especially when trying to create Excel Dashboards. I recommend YouTube for inspirations, especially if your project is going to expand! With a few button clicks and some nice colors, you can have some nice data visualization going.