Measure “Hours spent” is retrieved from the worklogs and you might want to use this measure in combination with dimensions “Logged by” (Jira Core measures and dimensions) or Tempo specific dimensions “Logged by Team” (Tempo).
If you have the Tempo app, add dimension “Logged by Team” to group issues by the user team who reported hours in Jira.
Check out this community post on a similar use case:
If you do not have Tempo, an alternative is to use “Logged by” dimension and group users by teams. The best approach would be to import the Team name as property for each Logged by user and then create a custom hierarchy (Custom hierarchies).
This community post describes step by step how to do this for the “Assignee” dimension. However, you can do the same thing and import properties for the Logged by dimension: