1. Sum total hours logged by task and team member
| Task | Alice | Bob | Charlie |
| Dashboard | 20 | 8 | 0 |
| API Endpoint | 16 | 12 | 10 |
| Database | 0 | 6 | 14 |
| Testing | 5 | 9 | 0 |
=PIVOTBY(A2:A11,B2:B11,E2:E11,"SUM")
Result: A cross-tabulation showing total hours per task per owner, with Dashboard totaling 28 hours, API Endpoint 38 hours, Database 20 hours, and Testing 14 hours.
PIVOTBY groups rows by task name (A2:A11) and columns by owner (B2:B11), then sums the hours from E2:E11. Alice logged two Dashboard entries (12+8=20 hours), while Bob logged 8 hours on Dashboard. Empty cells (0) represent task-owner pairs with no logged time.
2. Count how many times each owner appears on each task
| Owner | Dashboard | API Endpoint | Database | Testing |
| Alice | 2 | 1 | 0 | 1 |
| Bob | 1 | 1 | 1 | 1 |
| Charlie | 0 | 1 | 1 | 0 |
=PIVOTBY(B2:B11,A2:A11,A2:A11,"COUNTA")
Result: A table showing task assignment frequency per owner, with Alice assigned to 4 total tasks (2 instances on Dashboard, 1 on API, 0 on Database, 1 on Testing).
By reversing row and column fields, PIVOTBY now groups by owner (rows) and task (columns). The COUNTA function tallies the number of log entries for each owner-task combination. Alice appears twice for Dashboard, indicating multiple time entries; Bob appears once for each task, indicating one entry per task.
3. Calculate average hours per task and owner
| Task | Alice | Bob | Charlie |
| Dashboard | 10 | 8 | |
| API Endpoint | 16 | 12 | 10 |
| Database | | 6 | 14 |
| Testing | 5 | 9 | |
=PIVOTBY(A2:A11,B2:B11,E2:E11,"AVERAGE",TRUE)
Result: A table with average hours per task per owner with labeled headers; Dashboard-Alice averages 10 hours (the mean of 12 and 8), while API Endpoint-Bob averages 12 hours.
The AVERAGE function calculates the mean hours for each task-owner group. Alice's two Dashboard entries average to 10 hours. Blank cells represent combinations with no time logged; AVERAGE returns empty (not 0) when no values exist for a group. Setting field_headers to TRUE includes descriptive column labels.