# Add COUNT and COUNTIF functions in datasets reporting

**URL:** <https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045>\
**Category:** HubSpot Ideas\
**Tags:** reports\
**Created:** [February 27, 2023, 12:51pm UTC](https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045 "2023-02-27T12:51:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![CSaute](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/csaute/32/41931_2.png) [@CSaute](https://community.hubspot.com/u/CSaute)\
**Post date:** [February 27, 2023, 12:51pm UTC](https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045/1 "2023-02-27T12:51:51Z")

</div>

It would be super helpful to have an equivalent of COUNT and COUNTIF functions in the dataset part of reporting because it would allow to calculate retention rate or conversion rates and display it in dashboards.

Ex : I’d like to be able to do those calculations :

(nb of deals closed with ppty “renewal” = success / nb of deals closed with ppty “renewal” known) x 100

Thanks!

---

<div class="post-metadata">

**Author:** ![BramGroenveld](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@BramGroenveld](https://community.hubspot.com/u/BramGroenveld)\
**Post date:** [November 16, 2023, 10:09am UTC](https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045/2 "2023-11-16T10:09:41Z")

</div>

I am a bit disappointed in HubSpot that they haven’t already implemented features like this. These type of things would allow us to create so many different specific things, it seems like such an obvious feature to build!

For instance, I want to use this count how many contacts have a certain value, to display registrations for an event in the dashboard. This would be perfect!

---

<div class="post-metadata">

**Author:** ![AndersonReid](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@AndersonReid](https://community.hubspot.com/u/AndersonReid)\
**Post date:** [December 14, 2023, 1:40am UTC](https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045/3 "2023-12-14T01:40:53Z")

</div>

To resolve this issue, as a placeholder i created a “Count of Contact” property for contact records. Ive set up a small workflow that reads as "If ‘Count of contact’ is unknown: set to ‘1’ ". You can then plug this into a data set to use for SUM functions and make reports like you would in the custom report builder without a data set as your record type.  
The only downside is this takes a slot for your available properties. If your datasets dont run into that issue (mine do sadly) then this should solve the issue until hubspot ads it into data sets.  
Hope this helps anyone else having this issue.

---

<div class="post-metadata">

**Author:** ![laurabren](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/laurabren/32/10217_2.png) [@laurabren](https://community.hubspot.com/u/laurabren)\
**Post date:** [March 20, 2024, 4:07pm UTC](https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045/4 "2024-03-20T16:07:19Z")

</div>

+1! This needs to be in the custom formula builder in 1) datasets 2) custom properties within reports 3) custom equations in the calculated property builder.

---

<div class="post-metadata">

**Author:** ![00000](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/00000/32/80174_2.png) [@00000](https://community.hubspot.com/u/00000)\
**Post date:** [July 2, 2024, 2:43pm UTC](https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045/5 "2024-07-02T14:43:26Z")

</div>

@AndersonReid, Thank you for sharing this workaround!

---

<div class="post-metadata">

**Author:** ![PaulNispel](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@PaulNispel](https://community.hubspot.com/u/PaulNispel)\
**Post date:** [January 27, 2025, 10:48am UTC](https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045/6 "2025-01-27T10:48:56Z")

</div>

+1 would be so usefule for datasets

---

<div class="post-metadata">

**Author:** ![JGrayson6](https://avatars.discourse-cdn.com/v4/letter/j/838e76/32.png) [@JGrayson6](https://community.hubspot.com/u/JGrayson6)\
**Post date:** [October 3, 2025, 5:01pm UTC](https://community.hubspot.com/t/add-count-and-countif-functions-in-datasets-reporting/76045/7 "2025-10-03T17:01:14Z")

</div>

Does this exist now with data sets? I’m trying to create a custom formula to aggreagte job titles, but I’m not setting up the formula correctly. Can someone help?

This single formula for one job title works: (COUNT(IF([CONTACT.role\_drop\_down] = “Teacher PK-5”, 1, NULL))), but when I try mutliple titles, I receive an error:

(COUNT(IF([CONTACT.role\_drop\_down] = “Teacher PK-5”, 1, NULL),([CONTACT.role\_drop\_down] = “Teacher 6-12”, 1, NULL),([CONTACT.role\_drop\_down] = “Teacher on Special Assignment”, 1, NULL)))

Thanks for your help!
