Custom Formula Fields

JGrayson6
Contributor

Hello! I need assistance creating a custom formula in HubSpot. I'm trying to count the number of conversions if a recent conversion (form name) includes any of the following:

Arts, Wit, Geo, Mag, ELA

 

I created this formula, but there are a few erros that I do not know how to resolve. 

COUNT(IF(Contains([CONTACT.recent_conversion_event_name], "Arts", "Geo", "Wit", "Mag", "ELA", 1, NULL)))

 

Thanks so much for everyone's help. I really need a class in creating these custom formulas and the AI tool is not that helpful yet.

 

Jenny

0 Upvotes
2 Accepted solutions
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Hi @JGrayson6,

 

A few things:

  • You can omit the COUNT, the IF statement is enough.
  • HubSpot expects statements in upper case, it should be CONTAINS

That should fix it 🙂

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

View solution in original post

JGrayson6
Solution
Contributor

Thank you, this was the AI-generated solution that HubSpot came up with, and it worked. I finally asked the quesiton in the correct way.  😁

 

COUNT(IF(CONTAINS([CONTACT.recent_conversion_event_name], "Arts") OR CONTAINS([CONTACT.recent_conversion_event_name], "Geo") OR CONTAINS([CONTACT.recent_conversion_event_name], "Wit") OR CONTAINS([CONTACT.recent_conversion_event_name], "Mag") OR CONTAINS([CONTACT.recent_conversion_event_name], "ELA"), [CONTACT.recent_conversion_event_name], NULL))

View solution in original post

0 Upvotes
3 Replies 3
JGrayson6
Solution
Contributor

Thank you, this was the AI-generated solution that HubSpot came up with, and it worked. I finally asked the quesiton in the correct way.  😁

 

COUNT(IF(CONTAINS([CONTACT.recent_conversion_event_name], "Arts") OR CONTAINS([CONTACT.recent_conversion_event_name], "Geo") OR CONTAINS([CONTACT.recent_conversion_event_name], "Wit") OR CONTAINS([CONTACT.recent_conversion_event_name], "Mag") OR CONTAINS([CONTACT.recent_conversion_event_name], "ELA"), [CONTACT.recent_conversion_event_name], NULL))

0 Upvotes
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Hi @JGrayson6,

 

A few things:

  • You can omit the COUNT, the IF statement is enough.
  • HubSpot expects statements in upper case, it should be CONTAINS

That should fix it 🙂

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

SamTassey
Community Manager
Community Manager

Hi @JGrayson6

 

Thanks for posting in the Community! 

 

 @karstenkoehler contributed to this post from last week, which I believe you may find helpful! https://community.hubspot.com/t5/Dashboards-Reporting/Need-Formulas-to-Bucket-Property-Values/m-p/12...

 

I hope this helps guide you in the right direction. Please don't hesitate to reach out if you have any additional questions, both myself and the Community are here to assist!

Sam, Community Manager

0 Upvotes