I am trying to create a table card summarizing this data by Date and Department:
Summarized the table looks like the following:

How can I get the total rows to be correct on the card? I want the ability for the user to be able to drill down into a department and see a list of employees.
Thank you in advance for your assistance.