function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
XtinaStylesXtinaStyles 

Trying to create custom formula off of a check box???

Hi!  I am trying to create a custm formula within an opportunity report.  We create 1 opportunity that often results in multiple unit sales.  We then have a checkbox to indicate whether the sales person is committing to those sales.  I need that unit number to multiply by the number of checkboxes or treat the checkbox as a 1.

I am assuming I'll have to change the field to a number? 
Or is there a way I can insert a sort of IF, THEN statement (like if checkbox, then treat as a 1, and multiply by unit count)

Having so much trouble here, support won't help me and my CSM is being aloof (wants to talk about it in 2 weeks).

Thanks for any input!
AdminisaurusRexAdminisaurusRex
I need some backgroud info:
 
1) Do you have a "Unit Sales" custom number field on your Opportunity Object, or do you use Products in relation to Opportunities?
 
2) How many checkboxes do you have?  Is there just 1 "Committ to these unit sales" checkbox, or are there multiple checkboxes?
 
3) What is the desired outcome if that box is not checked?  "0"?  If you do have a single "Committ" checkbox, and you are using a single "Unit Sales" number field, you can use this formula in your new custom number formula field:
 
IF(Committ_checkbox, 1*Unit_sales_number , 0  )
 
I think that should work as the checkbox will return TRUE if checked and FALSE if not checked.
XtinaStylesXtinaStyles
1) We use "Opportunity Quantity", a custom number field, which indicates the number of units we sold in an opp.  We don't use products because we basically have 1 main product.
 
2) We have just 1 check box, titled "100% Opportunity"  Its a weird concept but my CEO loves it.. basically at the beginning of the month, sales people go in and check off the opps that they have confidence will close within the month.

3) 0 would be fine if the checkbox is unchecked.

So would I create a field with custom formula: IF(100% Opportunity_checkbox, 1*Unit_sales_number , 0  )?


Thanks so much for your help, AdminisaurusRex!
AdminisaurusRexAdminisaurusRex

Happy to help.

Your formula should work as I have previously described:

 

 A)  IF( 100_Opportunity_Checkbox_Field,
B)  Unit_Sales_Number_Field,
C) 0)

A: This will test if the 100_Opportunity_Checkbox_Field is checked or not.  If it is checked, then the formula will read "True".  If it is unchecked/blank, then the formula will read it as "False".
 
B) If the 100_Opportunity_Checkbox_Field is checked, and thus considered "True", the True condition is returned. Whatever is in Unit_Sales_Number_Field will be displayed.
 
C) If the 100_Opportunity_Checkbox_Field is unchecked, and thus considered "False", the False condition is returned.  We made it so that "0" will be displayed when the box is unchecked.
 
I'm sure that you probably already know all of this, Xtina, but I elected to risk boring you for the benefit of those who are not sure how the IF function works.  I know I would have benefitted from this long-winded explanation not so long ago.
 
Your formula and mine are basically the same and either will work.  Good luck.