Ashby Analytics
Getting Started with Analytics
Formula Fields
15 min
introduction formula fields are a new type of that allow mathematical and logical operations on top of your existing field data, bringing more robust customization to your reporting needs after a formula field is created, it is available for all filtering and grouping in reporting across ashby the standard mathematical operations for addition, subtraction, multiplication, and division are supported in addition to specialized functions such as if statements and date difference or addition functions looking for information on setting up calculated fields? check out docid\ wjbhw3mnd 381wu1n8f x for more on offer formula fields, check out docid\ m2ccyt8el19tq0pwpygvf general formula fields are only available on the enterprise plan true 148,148,148,150left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type offer formula fields are available on the plus and enterprise plans example use cases formula fields unlock a variety of potential use cases, but as motivation to think about applications, some conceptual examples are given below calculate bonus as a percentage of salary (multiplication) calculate total compensation of base salary and bonuses (addition of fields) calculate hourly rate from annual salary (division) check if an offer salary is within the opening's comp range (logical comparison) show time to fill in days (date difference) first interview to offer decided duration (date difference) hired before target date or started before target date (logical comparison of dates) field to flag new hire hitting 90 day mark (date offset) how to create a formula field creating a formula field follows the calculated field creation flow click on admin in the top navigation bar, then data management, then https //app ashbyhq com/admin/organizational settings/calculated fields click + new to create a new calculated field when creating a new calculated field, add in the object type, a title and select the formula calculated field type from the type dropdown click create you will then be taken to the formula field editor in the above example, we have a formula field that creates a new field returning a true/false value depending on whether the job consideration was hired prior to the associated opening’s target hire date the formula editor has a few noteworthy components the title and description of the new formula field the editor space wherein formulas, functions, and field references are combined insert field button click to add a new field or press $ as a hotkey insert function button click to add a specialized function cancel/save buttons save or cancel any changes after the field is saved, it can be used in filters and groupings if you have errors in your fields, you will not be able to save them you can hover over areas of the formula highlighted in red to see the issue an example use case for formula fields in this example, we'll create a formula field that track time to fill from the opening's opened at date right up to the new hire's start date firstly, we'll create our formula type calculated field via the steps docid\ foanoxyxfjwdmosc uztf when in the formula field editor, the datediff function is used to calculate the difference between two date fields the opening's \[opened at] date field and the offer's \[start date] fields have been specified finally, as part of the datediff functionality, the interval needs to be specified for this calculated formula fields, we've specified the interval to be in days when building reports, this field should then appear as an option for filtering or grouping reports it can also be used to display the calculated results as part of a custom list report formula field syntax reference this initial early access release of formula fields has a limited set of functionality, but more functions and operators will be added throughout the development phase of this feature referencing fields click the insert field button below the editor or type $ to choose a field and insert a field reference this substitutes the value of the chosen field into the expression at that position field references appear in {braces} in the expression editor booleans the boolean values are true and false numbers numbers may be integers or decimal numbers positive and negative values are supported 123 4 5 6 ranges a range is written range(start, end) range(1, 5) both of a range’s endpoints must be literal constant numeric values; more complex constructions like range(field, 1 + 2) are not accepted strings string values are single or double quoted “hello world” ‘i am text’ if you need to use a single or double quote in a string, you can either wrap the string with the other type of quote, or you can prefix it with \\\\ 'jane "example" doe' "jane \example\ doe" "john o'example" 'john o\\'example' to include a literal backslash in a string, use a double backslash "example\\\\\\\string" arithmetic numeric values may be added, subtracted, multiplied, or divided with +, , , / respectively 1+1 2 3 parentheses may be used for grouping ({score a} + {score b})/ 2 comparisons some operators have multiple accepted spellings, to maximize the chance of someone guessing correctly (for example, = and == ) either form is accepted; they will be normalized to the first (“canonical”) form as part of autoformatting values can be compared for equality with =and for inequality with != or <> {interviewer} = {referrer} {feedback submitted by} != {hiring manager} numeric values can additionally be compared with >, <, <=, and >= {number of job considerations} >= 3 {overall recommendation} < {average overall recommendation} comparisons may be chained together 1 <= {score} < 5 (equivalent to 1 <= {score} and {score} < 5 ) some fields contain numeric ranges use the inrange operator to check whether a value is within a range {salary expectation} inrange {compensation range} {score} inrange range(2, 8) conjunctions boolean variables can be combined with and (&, &&), or (|, ||), and not not {extended offer?} {candidate's location} != {job's location} and not {willing to relocate} available functions the initial set of supported functions is as follows for formula fields true 206,206,206left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left unhandled content type left unhandled content type left unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type left 1 1 unhandled content type function calls are written functionname(arg1, arg2, ) or functionname(name1 value1, name2 value2, ) function names are case insensitive and ignore underscores datediff , datediff , and date diff are all the same function (and will be autoformatted to datediff ) all functions come with inline syntax definitions and guidelines in app for example, here is the guidance on how to use the date difference operator operator precedence operations are evaluated in the following order, with operations in the same group evaluated in the order they appear in the expression (parenthesized groups) function calls() x a b, a / b a + b, a b a inrange b a = b , a ≠ b , a is b , a isnot b , a < b , a > b , a ≤ b , a ≥ b not x a and b , a or b