• [Wébinaire 13 novembre 2025] Comment l’IA optimise la performance marketing in HubSpot ?

    S'inscrire

CMS Development

GiantVoices
Participant | Partenaire solutions
Participant | Partenaire solutions

Calculation Property Doesn't Work if a Property is Blank

Résolue

Hello, 

 

Currently, we have the enterprise level HubSpot account and have been working on creating calculation properties to add together transactional pieces. There is a major roadblock with this property as it doesn't allow a calculation formula to run if there is a blank property. Is there any sort of workaround for this problem? 

 

Thanks, 

 

 

KP

5 Solutions acceptées
MelindaNelson
Solution
HubSpot Employee
HubSpot Employee

Calculation Property Doesn't Work if a Property is Blank

Résolue

Hi all,

 

I tested this with a customer today. Setting the properties included in the calculation property to 0 did work.

 

To configure this, you can:

  • Create the calculated property using two number properties.

Calculation Property.png

  • On the contact record, add 0 for any values that are unknown.

When the value for Number property 2 is blank, the Calculated number property is unknown.

Calculated Property2.png

When the value for Number property 2 is 0, the Calculated number property is calculated.

Calculated Property3.png

 

I hope this helps! Please let me know if you have any questions! 

 

Thanks,

Melinda | (She/Her)

Customer Support Specialist

Voir la solution dans l'envoi d'origine

JoshBarber
Solution
Contributeur | Partenaire solutions Platinum
Contributeur | Partenaire solutions Platinum

Calculation Property Doesn't Work if a Property is Blank

Résolue

In case anyone stumbles upon this like I did - I also couldn't get this to work and instead used workflows to set the default property to 0.

Voir la solution dans l'envoi d'origine

hub_muc
Solution
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Calculation Property Doesn't Work if a Property is Blank

Résolue

Alternative solution without using a workflow: Use Advanced Mode in the Calculation Property and combine if and is_present function before adding the properties:

(if(is_present([properties.xy]), [properties.xy], 0) +

Voir la solution dans l'envoi d'origine

Clare_HS
Solution
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

I couldn't use `is_present` for some reason. I wound up setting the unknown values to 0 within the formaul like:

 

if(is_known([properties.abc]),[properties.abc], 0) + if(is_known([properties.xyz]),[properties.xyz], 0)

 

So we're saying that if the NUMBER property has a value, use that vlaue in the calculation. If there's no value, call it 0 and calculate accordingly. 

That worked like a charm for me after a little trial and error 😀

Voir la solution dans l'envoi d'origine

sidneykeith
Solution
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

This is the best answer here and it helped me. Using this, I was able to get a working version that prefills all contacts with a value.

I'll provide my code here. Maybe the context will help someone else.

First it checks to make sure the fields exist. If either one is missing, the formula returns "no" and that is updated o nthe contact record. If they both exist, the formula proceeds to evaluating if one date is greater than (after) the other.

if (

  is_known( date1 ),

  if(

    is_known( date2 ),

    if(

      date1 > date2,

      "Yes",

      "No"

    ),

    "No"

  ),

  "No"

)

We had to do this because you cannot filter based on one date property being before or after another date property. So this calculation allows us to select it in report filtering. An absurd work around, but it works.

Voir la solution dans l'envoi d'origine

30 Réponses
esteeratliff
Contributeur

Calculation Property Doesn't Work if a Property is Blank

Résolue

Definitely still need an option to formulate within a calucation field if property is null or blank. All the above responses did not work for me & my Custom string if statement equation; Other than a workflow. My field is not important enough to warrant yet another workflow. That's what the calculated fields were supposed to help eliminate....

BBaber
Contributeur

Calculation Property Doesn't Work if a Property is Blank

Résolue

I ran into this issue today, and you first want to check the property for a value using is_known. 

If you share what you are trying to calculate, I can help provide a little more assistance

0 Votes
Clare_HS
Solution
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

I couldn't use `is_present` for some reason. I wound up setting the unknown values to 0 within the formaul like:

 

if(is_known([properties.abc]),[properties.abc], 0) + if(is_known([properties.xyz]),[properties.xyz], 0)

 

So we're saying that if the NUMBER property has a value, use that vlaue in the calculation. If there's no value, call it 0 and calculate accordingly. 

That worked like a charm for me after a little trial and error 😀

sidneykeith
Solution
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

This is the best answer here and it helped me. Using this, I was able to get a working version that prefills all contacts with a value.

I'll provide my code here. Maybe the context will help someone else.

First it checks to make sure the fields exist. If either one is missing, the formula returns "no" and that is updated o nthe contact record. If they both exist, the formula proceeds to evaluating if one date is greater than (after) the other.

if (

  is_known( date1 ),

  if(

    is_known( date2 ),

    if(

      date1 > date2,

      "Yes",

      "No"

    ),

    "No"

  ),

  "No"

)

We had to do this because you cannot filter based on one date property being before or after another date property. So this calculation allows us to select it in report filtering. An absurd work around, but it works.

GrowthArchitect
Contributeur | Partenaire solutions Gold
Contributeur | Partenaire solutions Gold

Calculation Property Doesn't Work if a Property is Blank

Résolue

This is a much better solution when compared to using workflows to zero fields if they are unknown. Workflows like this saturate the activity history of a record and should be avoided wherever possible to ensure only required workflows are triggered on records. 

markmhaddad
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

Yup, HubSpot changed the is_present function to is_known (presumably to align with the terminology they use in filters)!

0 Votes
hub_muc
Solution
Participant | Partenaire solutions Diamond
Participant | Partenaire solutions Diamond

Calculation Property Doesn't Work if a Property is Blank

Résolue

Alternative solution without using a workflow: Use Advanced Mode in the Calculation Property and combine if and is_present function before adding the properties:

(if(is_present([properties.xy]), [properties.xy], 0) +

JoshBarber
Contributeur | Partenaire solutions Platinum
Contributeur | Partenaire solutions Platinum

Calculation Property Doesn't Work if a Property is Blank

Résolue

This works a treat for calculations that require you to calculate with other calculations/rollups where you can't set the default value to 0, and should be marked as the solution. No longer need workflows.

markmhaddad
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

Under-rated comment here - this is the best solution!

0 Votes
FZangerl
Membre

Calculation Property Doesn't Work if a Property is Blank

Résolue

At first: big shame on Hubspot that the paying users have to find workarounds for problems like this - problems, that appeared already years ago. 

 

At second: in my opinion the easiest solution is to use a workflow and the funktion

 

"Increase or decrease property" and increase the value by 0, because unknown + 0 = 0

 

Best, 

 

Florian

 

MarijnAIHR
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

Hi @MHill4 
Thanks for this workaround. Could you maybe share a screenshot of your solution? I cannot get it to work myself - if I multiply an unknown value times 1, I still get unknown, not 0...

MarijnAIHR_0-1637845371723.png

---

MarijnAIHR_1-1637845395174.png

 

 

JoshBarber
Solution
Contributeur | Partenaire solutions Platinum
Contributeur | Partenaire solutions Platinum

Calculation Property Doesn't Work if a Property is Blank

Résolue

In case anyone stumbles upon this like I did - I also couldn't get this to work and instead used workflows to set the default property to 0.

MHill4
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

Sorry, by Constant 1, I just meant the number 1. 

In the calculation property A for example, your formula would be: (Property A x 1)

 

That way unknowns for Property A stay unknown, but you can still include those in calculations as 0.

 

So for @GiantVoices example above. You would make a new calculation property for each of the properties in the proposed formula. For example "2015 Q1 Payment Amount Calc," which would equal (2015 Q1 Payment Amount x 1).

 

For records with unknown 2015 Q1 Payment Amount, 2015 Q1 Payment Amount Calc = 0

 

For records with a number entered in 2015 Q1 Payment Amount, 2015 Q1Payment Amount = the same number.

 

does that help?

0 Votes
MHill4
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

Hi All,

 

I believe I may have found a solution to this issue. A bit of effort upfront, but it definitely works!

 

Lets say: Property A + Property B + Property C = Calculation Property X

For each of Property A, B and C, just create a new calculation property, maybe labeled "Property A Calc", where you do (Property A x Constant 1) = Property A Calc. If Property A is blank, the Property A Calc property will be 0. If Property A is known, Property A Calc = Property A.

 

So then to get Calculation Property X, you would just do Property A Calc + Property B Calc + Property C Calc. Then it runs perfectly! AND you don't need to do any workflows and you maintain the blank status of the original field which is important!

 

andresmorera
Participant | Partenaire solutions Gold
Participant | Partenaire solutions Gold

Calculation Property Doesn't Work if a Property is Blank

Résolue

Thank you MHill4,

 

What should be the value for Constant 1 in the formula or should I create a new porperty named Constant 1?
Thanks for clarifying.

Andres

0 Votes
sgerrits
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

I've built workflows that set the property to 0 if unkown but then the problem is if you have a calculation property that references another calculation, there's no way of getting the second calculation to work if all of the criteria are not met.  Pretty frustrating.  

CTeeling
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

@MFrankJohnson 

Hi, Frank, 

 

I'm running into this exact issue now - Is there a best practice to set multiple default values to zero in a single workflow, or did you have to create multiple workflows to set multiple default values?

0 Votes
Deflow
Participant

Calculation Property Doesn't Work if a Property is Blank

Résolue

The simplest way I have found to do this is as follows:

 

  • First we want to check the value to see if there is anything entered in there. Hence "less than or equal to $0 or EMPTY".
  • If value is empty, then set the property to be 0.
  • If value is not empty or is greater than $0 then "go to action"

 

  • This second action is repeating the same steps as above on the next value that needs to be checked.

Deflow_0-1625116689033.png

 

I do like the method above using calculated values but if you are not on an enterprise account then you need to use your 5 calulated fields sparingly.

 

0 Votes
MelindaNelson
Solution
HubSpot Employee
HubSpot Employee

Calculation Property Doesn't Work if a Property is Blank

Résolue

Hi all,

 

I tested this with a customer today. Setting the properties included in the calculation property to 0 did work.

 

To configure this, you can:

  • Create the calculated property using two number properties.

Calculation Property.png

  • On the contact record, add 0 for any values that are unknown.

When the value for Number property 2 is blank, the Calculated number property is unknown.

Calculated Property2.png

When the value for Number property 2 is 0, the Calculated number property is calculated.

Calculated Property3.png

 

I hope this helps! Please let me know if you have any questions! 

 

Thanks,

Melinda | (She/Her)

Customer Support Specialist

CleberAlexandre
Membre

Calculation Property Doesn't Work if a Property is Blank

Résolue

Where can I configure this?

  • On the contact record, add 0 for any values that are unknown.
0 Votes