Carrot reference
Functions
turnoverRate()
calculates a turnover rate (also known as attrition rate), used to measure the rate of employee departures turnover is calculated as the number of departures that occurred over a period of time, divided by the average of headcount at the start of the period and the headcount at the end of the period for example, if measuring turnover in calendar year 2025, if the organization began the year on with 100 people on jan 1 saw 20 departures through the course of the year ended the year at 150 people on dec 31 then turnover rate is 20 / ((100 + 150) / 2) = 16% syntax turnoverrate(fromdate, untildate\[, jobfilter]\[, departfilter]\[, groupby]) parameters parameter types description fromdate date docid\ xtaqdzvlbtakjxrnpfwe9 or string docid\ ujw2aqaktel5uuklup73s t he starting point date (inclusive) of the interval being measured for turnover for example if measuring turnover in the calendar year 2025, this would be 2025 01 01 untildate date docid\ xtaqdzvlbtakjxrnpfwe9 or string docid\ ujw2aqaktel5uuklup73s the ending date (exclusive) of the interval being measured for turnover for example, if measuring turnover in the calendar year 2025, this would be 2026 01 01 jobfilter @expression an expression to filter which jobs will be included in the calculation for example, if excluding contract roles or interns from the calculation, could use {!employment\ contract,intern} departfilter @expression an expression to filter what types of departures will be included in the calculation for example, if only including voluntary departures, could use {depart\ voluntary} groupby @expression if used, will group the results by the expression for example, if calculating turnover rate broken down by gender, you could pass {gender} returns number docid\ uci5tctfvbhonej6zqijg if the groupby parameter was not used, or an @aggregatedresult if the groupby parameter was used the result will be the calculated turnover value over the period of time examples within a dashboard, overall annual turnover `turnoverrate(' 1y+1d', date() returns the current date date(" 3m") returns the date three months ago date(1744206569) returns the date of april 9, 2025 (by converting from a unix timestamp) date("2025 12 25") returns the exact date of dec 25, 2025 date("+6w", createdate) returns a date six weeks from the value of createdate