# Calculated field

**URL:** <https://community.hubspot.com/t/calculated-field/117168>\
**Category:** CRM\
**Tags:** starter\
**Created:** [September 26, 2024, 9:26pm UTC](https://community.hubspot.com/t/calculated-field/117168 "2024-09-26T21:26:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![CClark3](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@CClark3](https://community.hubspot.com/u/CClark3)\
**Post date:** [September 26, 2024, 9:26pm UTC](https://community.hubspot.com/t/calculated-field/117168/1 "2024-09-26T21:26:40Z")

</div>

I’m having problems trying to think of of this calculated field. I have 3 seperate fields all yes and no dropdowns. Has this been sent to billings, Has resources been allocated, Is budget available. I created a custom calculated field that I need to return back true when these 3 fields on the deal are all yes. When i try to make the calculated field its saying a have an error. Im using the If statement from below. Could anyone help with this anmd getting into a calcualted field? I know I could use a workflow but woul prefer to have the calculation in the field.

if([properties.resources\_officially\_allocated\_to\_project\_]= “Yes”,[properties.billings\_added\_on\_project\_]= “Yes”, [properties.budget\_approved\_on\_project\_]= “Yes”, True, False)

---

<div class="post-metadata">

**Author:** ![Shadab\_Khan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shadab_khan/32/12293_2.png) [@Shadab\_Khan](https://community.hubspot.com/u/Shadab_Khan)\
**Post date:** [September 27, 2024, 12:07am UTC](https://community.hubspot.com/t/calculated-field/117168/2 "2024-09-27T00:07:13Z")

</div>

Hi @CClark3

The problem seems to be that you’re passing **string values** (like “Yes”) into the calculation, which isn’t how HubSpot handles Boolean fields (like checkboxes or yes/no fields). Here’s a better approach:

- **The Issue** :

- **The Solution** :

- **Here’s the corrected approach** :

- **Video Walkthrough** :  
I’ve attached a **[Loom video](https://www.loom.com/share/94220aa023fe414aa6557208940e59fa)** to help you visualize the solution, where I walk through a demo instance and show how to set up this calculated field correctly.

Let me know if this helps, and feel free to reach out if you need further clarification!  
Stay Awesome & Keep Doing it BIG 🔥

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [September 27, 2024, 4:23am UTC](https://community.hubspot.com/t/calculated-field/117168/3 "2024-09-27T04:23:23Z")

</div>

Hi @CClark3,

Could you confirm whether your properties are dropdowns with options “Yes” and “No”, or single checkboxes?

If they’re **dropdowns** , the formula (with output type boolean) would have to look like a bit more complicated like this, to check whether a property has a value first, if not, return false, followed by nested if-statements:

`if(is_known([properties.billings_added_on_project_]) and is_known([properties.budget_approved_on_project_]) and is_known([properties.resources_officially_allocated_to_project_]),if([properties.billings_added_on_project_]="Yes",if([properties.budget_approved_on_project_]="Yes",if([properties.resources_officially_allocated_to_project_]="Yes",true,false),false),false),false)`

 ![karstenkoehler_0-1727411029024.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/4/41087f32f9e70fc935f50371011debbd842f5bf8.png)

 ![karstenkoehler_1-1727411037941.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/4/94a39c160fc6ae2d65069845e6cd933a8fbd684e.png)

 ![karstenkoehler_2-1727411045166.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/0/081537c94fbec96c55d6abf83117942dd041c0b2.png)

If they’re **single checkboxes** , the formula (with output type boolean) could be simplified to this:

`if([properties.resources_officially_allocated_to_project_] and [properties.billings_added_on_project_] and [properties.budget_approved_on_project_], true, false)`

Please note: HubSpot expects “true” and “false” to be lowercase in a boolean custom equation

Please share a screenshot of your formula and the issues if this still doesn’t work.

Best regards

---

<div class="post-metadata">

**Author:** ![CClark3](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@CClark3](https://community.hubspot.com/u/CClark3)\
**Post date:** [October 1, 2024, 3:31pm UTC](https://community.hubspot.com/t/calculated-field/117168/4 "2024-10-01T15:31:03Z")

</div>

Hello,

Thank you so much for your help. @karstenkoehler and [@Shadab\_Khan](https://community.hubspot.com/t5/user/viewprofilepage/user-id/513582) I do have an additional question, is it possible to add an Or function for this? For example those 3 fields still have to be Yes in order for the calculated field to be marked true but we are adding a 4th field called Manually forecasted that if this is marked yes the calculated field should also be changed to true. is it possible to add this as well?

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [October 1, 2024, 3:35pm UTC](https://community.hubspot.com/t/calculated-field/117168/5 "2024-10-01T15:35:18Z")

</div>

@CClark3 sure, it depends, which formula did you end up using?

---

<div class="post-metadata">

**Author:** ![CClark3](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@CClark3](https://community.hubspot.com/u/CClark3)\
**Post date:** [October 1, 2024, 3:48pm UTC](https://community.hubspot.com/t/calculated-field/117168/6 "2024-10-01T15:48:36Z")

</div>

Yes I ended up using the IF function I copied it below:

if((([properties.resources\_officially\_allocated\_to\_project\_] && [properties.billings\_added\_to\_project\_]) && [properties.budget\_added\_to\_project\_]), true, false)

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [October 1, 2024, 3:51pm UTC](https://community.hubspot.com/t/calculated-field/117168/7 "2024-10-01T15:51:31Z")

</div>

@CClark3 you would nest two if functions then.

1. The first if function checks whether your manual forecast property is checked, if yes, return true, if no (as the second argument) move on to the nested second if function
2. The second if function would be what you have already

---

<div class="post-metadata">

**Author:** ![CClark3](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@CClark3](https://community.hubspot.com/u/CClark3)\
**Post date:** [October 1, 2024, 4:22pm UTC](https://community.hubspot.com/t/calculated-field/117168/8 "2024-10-01T16:22:39Z")

</div>

Tahnk you, I believe I did this correctly but I’m concerned that when I tested the formula if the Manual forecast is blank (which it will be if the others are filled out) that the formula does not produce an output, is this correct? i attached a screenshot

 ![If function calculated field.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/2X/2/28e93ed56e3103966852e59375c83978903784ef.png)

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [October 1, 2024, 4:27pm UTC](https://community.hubspot.com/t/calculated-field/117168/9 "2024-10-01T16:27:04Z")

</div>

@CClark3 please review my previous answer again, the if functions shouldn’t be combined by an OR operator, the second IF function is within the first, as it’s second argument.

---

<div class="post-metadata">

**Author:** ![CClark3](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@CClark3](https://community.hubspot.com/u/CClark3)\
**Post date:** [October 1, 2024, 4:44pm UTC](https://community.hubspot.com/t/calculated-field/117168/10 "2024-10-01T16:44:55Z")

</div>

Thank you I removed this and still received the same issue if the manual field was left blank. Its not big of an issue because i can create a workflow that has the manual forecast field selected to No whenever a deal is created since this field would be changed manually.

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [October 1, 2024, 4:45pm UTC](https://community.hubspot.com/t/calculated-field/117168/11 "2024-10-01T16:45:36Z")

</div>

@CClark3 here’s the entire formula:

 ![karstenkoehler_0-1727801085156.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/9/9a8685076d586f39408adf1047c8c5baaf112739.png)

This would:

- return true when manual forecast is true
- return true when all of the three other properties are true
- return false in all other cases (including empty fields)

Please test and mark as accepted solution 🙂
