Count Number of Options in CheckBoxes

Hello.
I have a property that is a “Multiple checkboxes” property. I need the number of the values selected, rather than the actual value.
Ex.
Property called “Product”

Deal 1
     - Product A (selected)
     - Product B (Not selected)
     - Product C (selected)

Deal #2
     - Product A (selected)
     - Product B (selected)
     - Product C (selected)

Deal #2
     - Product A (Not selected)
     - Product B (Not selected)
     - Product C (selected)
I would need the number of the selected Product. I have a property called “Count Product A”, “Count Product B”, “Count Product C”

Count Product A = 2

Count Product B = 1

Count Product C = 3

Hi @Dan0210
I am curious where this calculation property would store.
It might be easier to create a list that holds every deal with Product A, then a List with Product B… etc. Then yo0u could see the total from there.

Thanks for your suggestion! Just to clarify, the count for each product (“Count Product A,” “Count Product B”) is stored in the Company record, not the Deal itself. My goal is to display this count in the Company card when I select a specific company.

I’m hoping to find a way to automatically update these counts based on the products selected in the deals associated with each company. Any ideas or suggestions on how to best achieve this within HubSpot?

Thanks again for your help!

Hi @Dan0210 ,

Ok, that makes more sense. This should be a Company Rollup property.
Rollup Type: Count
Number Format: Formatted Number
Association Type: Deal
[Choose Association Label]
Associated Record Property: Product
Additional Condition: Product == Product A
Create that for Product A, B and C

Hi @JWingate2,

I tried that, but when I select Product A and B in one deal, the count shows as zero. Also, when I select 1 product in Deal 1 and 2 products in Deal 2, the count is still zero.

However, when I select only Product A in two deals, the count is correctly shown as two.

Any thoughts on why this might be happening?

Hello Dan have you resolved this?

I have found a very good solution on this matter by connecting Hubspot with Clay (if you are a user) or by leveraging LLM to generate the counts of unique options within the field. If you have a OpenAI api will work.

@Dan0210 I don’t, though it seems like the formula is incomplete or false is additional checkboxes are marked and it doesn’t allow to make the acceptions.
Do you by chance have Operations Hub?

Yes, I have Operations Hub

I am going to tag in the very smart @danmoyle to see if he has different thoughts than I.

Thank you @JWingate2

Hi @JWingate2,

I Figured it out.

Deal Property = “Product A”

Calculation

if(contains([properties.Product],“Product A”),1,0)

Then

Company Property = “Product A Total”

Roll up Type: Sum

Number Format: Formatted Number
Association Type: Deal
Associated Record Property: Product A
Additional Condition: Is Closed (numeric) == 1

Now when i select multiple product for property Product A the result will be 1

@Dan0210 ,

Perfect! Thanks for sharing the details to this.

Thnks for thinking of me @JWingate2 - glad you got it figured out @Dan0210 :blush:

Yes I have a Operations Hub.

@Dan0210
Could you possibly achieve this with a workflow? Using the Format Data to add to the field every time the product is associated?

Sorry, I just checked i only have the Free Operations Tool

Hi @Dan0210,

This has been discussed in a previous thread and this solution still a solid option: https://community.hubspot.com/t5/9881-Operations-Hub/Count-the-amount-of-values-in-a-multi-checkbox-property/m-p/770513/highlight/true#M1367

It feels a bit archaic because you’re forcing a workflow to actually check each item and manually count, as opposed to storing a rule – but it does the trick :slightly_smiling_face:

Let me know if you need more detailed instructions or run into any issues when creating that workflow. Happy to elaborate and help!