# Nested Grouping with Counts

**URL:** <https://community.hubspot.com/t/nested-grouping-with-counts/122365>\
**Category:** Reporting & Analytics\
**Tags:** reports\
**Created:** [December 12, 2024, 6:57am UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365 "2024-12-12T06:57:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![BHarris-AU](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@BHarris-AU](https://community.hubspot.com/u/BHarris-AU)\
**Post date:** [December 12, 2024, 6:57am UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/1 "2024-12-12T06:57:53Z")

</div>

New to HubSpot and especially new to HubSpot reporting.

Forgive me if this is super simple but I can’t seem to work it out.

I am looking to build a Company based report that can first be filtered and grouped using one custom field. And then nest another group based on a different custom field.

Partner Status has 4 options but we wish to only report on two of them ‘Alumni’ and ‘Partner’. It would be good to have a count of them on the report.

Partnership Tier had 4 options and we would like to report on Company Name and Company Owner for all the tiers and have a count for each tier as well.

See image attached

 ![Image 3.jpeg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/4/048b3fd52549ef3d96aa6198831d7a3e5bfc9a0a.jpeg)

The closest we have is a Pivot Table that pulls and separates by the criteria mentioned, but doesn’t seem to give the freedom and flexibility for everything we are looking for or displaying in the way we would like to report.

 ![Screenshot 2024-12-12 at 4.56.11 pm.png](https://d2qpr2jzcazej7.cloudfront.net/original/1X/972e0a2f7e1fe9da114a53ced90a459f8e604b88.png)

---

<div class="post-metadata">

**Author:** ![Josh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/josh/32/17115_2.png) [@Josh](https://community.hubspot.com/u/Josh)\
**Post date:** [December 12, 2024, 2:17pm UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/2 "2024-12-12T14:17:33Z")

</div>

Hi @BHarris-AU,

A pivot table will be your only option in this scenario. It can be tricky to get these reports exactly how you want them, but you don’t have many other options.

Now, if you have Operations Hub Pro or Enterprise, you can use a custom dataset to organize your data and report as needed. Essentially you would be able to use data sets to organize your partner tiers and then report on the company and count information in a more flexible manner.

Here’s more information on datasets: [Build and activate datasets in Data Studio](https://knowledge.hubspot.com/data-management/create-and-use-datasets)

Josh

---

<div class="post-metadata">

**Author:** ![BHarris-AU](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@BHarris-AU](https://community.hubspot.com/u/BHarris-AU)\
**Post date:** [December 16, 2024, 1:06am UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/3 "2024-12-16T01:06:51Z")

</div>

Brilliant. Thank you so much @Josh

Again, I feel like a noob here in HubSpot as my main CRM experience has been with many other platforms and in the last 10 years I had little to do with any custom reports.

So as it turns out we do have Operations Hub Pro and I have been playing around with datasets.

Would love some guidance on what you are thinking would work for this as my first thoughts went to trying to create multiple smaller data sets (filtering by Status or Tier) and then linking them all together in one report. However, and as you probably know, that just used up all my dataset options and I couldn’t seem to work out how to then link them all in one report as it appeared to only be able to use one dataset.

In preparation for a report, I have created a larger dataset filtering by Alumni and Partner and then used a rudimentary IF statement for counting Partners or Alumni, with a Sum for for each. I thought about needing to do this again for tiers but again, ran out of fields (maxed at 5).

 ![Screenshot 2024-12-16 at 11.07.24 am.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/a/1a38a0594bef90b1da3d103d9d790faf79cb4bbd.png)

So the way my mind pictured it still doesn’t quite work and would love some guidance.

---

<div class="post-metadata">

**Author:** ![Josh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/josh/32/17115_2.png) [@Josh](https://community.hubspot.com/u/Josh)\
**Post date:** [December 17, 2024, 3:05pm UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/4 "2024-12-17T15:05:33Z")

</div>

@BHarris-AU,

I’d be happy to work with you on this report. Please use my link to schedule a time that works for you.

Josh

---

<div class="post-metadata">

**Author:** ![BHarris-AU](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@BHarris-AU](https://community.hubspot.com/u/BHarris-AU)\
**Post date:** [December 18, 2024, 8:50pm UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/5 "2024-12-18T20:50:26Z")

</div>

Thank you @Josh

I apprecaite the time you took to talk me through this.

---

<div class="post-metadata">

**Author:** ![vinayakjjw1](https://avatars.discourse-cdn.com/v4/letter/v/76d3ee/32.png) [@vinayakjjw1](https://community.hubspot.com/u/vinayakjjw1)\
**Post date:** [December 17, 2024, 6:31am UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/6 "2024-12-17T06:31:17Z")

</div>

Hi @BHarris-AU - This seems extremely easy to do on a spreadsheet, any reason to do this using HubSpot only?

---

<div class="post-metadata">

**Author:** ![BHarris-AU](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@BHarris-AU](https://community.hubspot.com/u/BHarris-AU)\
**Post date:** [December 17, 2024, 9:33pm UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/7 "2024-12-17T21:33:51Z")

</div>

I apprecaite the thought @vinayakjjw1 and yes, I had already created this through an export. The reason for trying to keep this within HubSpot is prevent having to do an export each time. These values can change on a monthly basis and (if possible) i’d like to have this fully automated to support another team member.

---

<div class="post-metadata">

**Author:** ![vinayakjjw1](https://avatars.discourse-cdn.com/v4/letter/v/76d3ee/32.png) [@vinayakjjw1](https://community.hubspot.com/u/vinayakjjw1)\
**Post date:** [January 7, 2025, 7:30am UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/8 "2025-01-07T07:30:51Z")

</div>

Hi @BHarris-AU

**Option 1: HubSpot Pivot Tables & Custom Datasets**

As Josh mentioned, a **pivot table** within HubSpot is one way to approach this scenario. While it might not provide all the flexibility for nested grouping, it’s a good starting point.

If you’re using **Operations Hub Pro or Enterprise** , you can leverage **custom datasets**. Datasets allow you to organize your data by Partnership Tier and report on the company and contact information in a more flexible manner. You can find more details on datasets here: [HubSpot Datasets Documentation](https://knowledge.hubspot.com/data-management/create-and-use-datasets).

**Option 2: Using Automated Spreadsheets**

Agreed maintaining spreadsheet manually is a major hassle! Here is an option to do that automatically:

For custom reporting needs like this, a tool such as **[Superjoin](https://www.superjoin.ai/integrations/hubspot?utm_source=hubspot_community&utm_medium=forum&utm_campaign=nested_grouping_counts) (or any HubSpot Google Sheet connector)** can help. Here’s how:

1. **Export Data to Google Sheets** : Pull the required data (e.g., Partnership Tiers, Company Names, and Owners) into Google Sheets.
2. **Create Pivot Tables** : Use Google Sheets to group data according to your business need and create pivot tables.
3. Setup Refresh Schedule: This will update data in HubSpot and also update the pivot table dynamically.

So your report stays updated without needing manual intervention.

---

<div class="post-metadata">

**Author:** ![BHarris-AU](https://avatars.discourse-cdn.com/v4/letter/b/e19b73/32.png) [@BHarris-AU](https://community.hubspot.com/u/BHarris-AU)\
**Post date:** [January 7, 2025, 11:31pm UTC](https://community.hubspot.com/t/nested-grouping-with-counts/122365/9 "2025-01-07T23:31:37Z")

</div>

Excellent. Thanks for the advice
