{"id":445,"date":"2021-02-17T20:18:09","date_gmt":"2021-02-17T20:18:09","guid":{"rendered":"https:\/\/help.insperity.com\/bps\/?post_type=ht_kb&#038;p=445"},"modified":"2021-03-11T00:36:12","modified_gmt":"2021-03-11T00:36:12","slug":"creating-formula-fields","status":"publish","type":"ht_kb","link":"https:\/\/help.insperity.com\/bps\/knowledge-base\/creating-formula-fields\/","title":{"rendered":"Creating formula fields"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Formula Fields Overview<\/h2>\n\n\n\n<p>Insperity Organizational Planning can be configured to add custom formula fields that work with your data to create powerful insight to your company&#8217;s charts.\u00a0 Formula fields leverage the existing information in your data source and the attributes associated with each employee such as start date, birth date, gender, or EEOC category.\u00a0<\/p>\n\n\n\n<p>The most common formula fields include headcount, which calculate based the number of employees in the chart, or salary totals, which calculates the sum of all the salaries within a range.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Adding a Formula Field<\/h2>\n\n\n\n<p>Navigate to <strong>Administration<\/strong> (1), then to <strong>Fields<\/strong> (2).\u00a0 Once in Fields, click on <strong>Add Formula<\/strong> (3).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"553\" height=\"214\" src=\"https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-71.png\" alt=\"\" class=\"wp-image-446\" srcset=\"https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-71.png 553w, https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-71-300x116.png 300w, https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-71-50x19.png 50w, https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-71-60x23.png 60w, https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-71-100x39.png 100w\" sizes=\"auto, (max-width: 553px) 100vw, 553px\" \/><\/figure>\n\n\n\n<p>Complete the following fields under <strong>Field Properties<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Display Name<\/strong>:\u00a0 Type the name you would like to call this field. This will also be the name of the field that will display by default on the box when adding to a view.\u00a0<\/td><td><\/td><td><\/td><\/tr><tr><td><strong>Description:<\/strong> (Optional) Type any descriptions for the formula field that will be helpful when reviewing the formula.<\/td><td><\/td><td><\/td><\/tr><tr><td><strong>Categories:<\/strong>\u00a0 Select the formula Category type <br><br><em>Number <\/em>&#8211; Use when you will be creating a formula based on numbers. \u00a0\u00a0Example, \u201cTotal Salary\u201d <br><br><em>Date<\/em>&#8211; Use when you want to use a date field to make the calculation. \u00a0Example, \u201cDays from hire\u201d <br><br><em>Lookup and Reference<\/em>&#8211; Use when you need OrgPlus to look up data in your data source. \u00a0Example, \u201cHeadcount\u201d \u00a0 <br><br><em>Text <\/em>&#8211; Use when you are creating formulas from text values in a data source. \u00a0Example, \u201cFull Name\u201d from First Name and Last Name fields.<\/td><td><\/td><td><\/td><\/tr><tr><td><strong>Functions<\/strong>:\u00a0 Select the function to apply to the calculation. <br><br><em>Date<\/em>&#8211; The following functions are for use with Date fields. <br>  <span class=\"has-inline-color has-blue-color\">Date Add:\u00a0Adds the specified number of days, months, or years to a date.<br>  Day: Return the day from the selected date field.<br>  Month: Return the month (1-12) from the selected date field.<\/span><br>  Number of Days: Return the number of days between two dates.<br>  Year: Return the year from the selected date field. <br><br><em>Lookup and Reference<\/em> &#8211; The following functions are for use with Lookup and Reference fields. <br>  Count: Count the number of people within a range of boxes.<br>  Level: Calculate the absolute level of a box.<br>  Levels Below: Calculate the number of levels that exist below a box relative to   the box&#8217;s level.<br>  Occurrences: Calculate how often an individual or position occurs within a range of boxes.<br>  Reports\u00a0To: Return the argument of the box&#8217;s manager <br><br><em>Number <\/em>&#8211; The following functions are for use with number fields. <br>  Average: Compute an average of the selected number field for all specified boxes.<br>  Calculate: Return the arithmetic computation (add, subtract, multiply, divide) of the selected field within a range of boxes.<br>  Max: Determine the maximum value of the selected field across all boxes.<br>  Min: Determine the minimum value of the selected field across all boxes.<br>  Total: Add all the selected field within a range of boxes. <br><br><em>Text <\/em>&#8211; The following functions are for use with text fields. <br>  Concatenate:\u00a0Joins several text strings and\/or fields into one text string.<br>  Left: Return the specified number of characters from the start of a text string.<br>  Length: Return the total number of characters in a text string.<br>  Lower: Convert all letters in a text string to lowercase.<br>  Mid: Return the characters from the middle of a text string, given a starting position and a length.<br>  Right: Return a specified number of characters from the end of a text string.<br>  Trim: Remove all spaces from a text string except for single spaces between words.<br>  Upper: Convert all letters in a text string to uppercase. \u00a0<\/td><td>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<\/td><td><\/td><\/tr><tr><td><strong>Formula Creation<\/strong>:&nbsp; Based on what Category- Function you choose, you are to begin creating the argument to support the formula.&nbsp; This may be a series of field drop down selections.<\/td><td>&nbsp;<\/td><td><\/td><\/tr><tr><td><strong>Formula Condition: <\/strong>\u00a0Apply this function if you would like to only apply the formula to certain employees who meet specific conditions, such as full time or part time. <br><br>(1) Check the box to allow the condition <br><br>(2) Create your condition by creating rules <br>  Select the field that will decide the condition<br>  Select the qualifying argument (equal to, is, is not..)<br>  Then complete the qualifying condition<br>  Example, \u201cEmployee Status\u201d is \u201cFull Time\u201d <br><br>(3)\u00a0 Click <strong>Okay<\/strong> when complete<\/td><td><\/td><td><\/td><\/tr><tr><td><strong>Formula Operations: <\/strong>&nbsp;In this section you can change the defaults for rounding, including\/excluding assistants and matrixed employees.<\/td><td>&nbsp;<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Once you have your formula created, press <strong>Save<\/strong>.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"461\" height=\"212\" src=\"https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-72.png\" alt=\"\" class=\"wp-image-447\" srcset=\"https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-72.png 461w, https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-72-300x138.png 300w, https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-72-50x23.png 50w, https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-72-60x28.png 60w, https:\/\/help.insperity.com\/bps\/wp-content\/uploads\/sites\/3\/2021\/02\/image-72-100x46.png 100w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><\/figure>\n\n\n\n<p>Your new calculated field is available to use in your views and conditional formatting.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Formula Fields Overview Insperity Organizational Planning can be configured to add custom formula fields that work with your data to create powerful insight to your company&#8217;s charts.\u00a0 Formula fields leverage the existing information in your data source and the attributes associated with each employee such as start date, birth date,&#8230;<\/p>\n","protected":false},"author":2,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[38],"ht-kb-tag":[],"class_list":["post-445","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-fields"],"_links":{"self":[{"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/ht-kb\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/comments?post=445"}],"version-history":[{"count":1,"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/ht-kb\/445\/revisions"}],"predecessor-version":[{"id":448,"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/ht-kb\/445\/revisions\/448"}],"wp:attachment":[{"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/ht-kb-category?post=445"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/help.insperity.com\/bps\/wp-json\/wp\/v2\/ht-kb-tag?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}