---
title: Helpful Calculated Fields in Casebook
description: Casebook allows you to define new fields in the dataset, named calculated fields. The following fields can be copy and pasted into Casebook.
---

[Skip to content](https://gohub.casebook.net/knowledge/helpful-calculated-fields-in-casebook#main-content)

[More support](https://gohub.casebook.net/knowledge/kb-tickets/new)

[![logo-raspberry (1)](https://gohub.casebook.net/hs-fs/hubfs/logo-raspberry%20(1).png?width=1286&height=255&name=logo-raspberry%20(1).png)](https://gohub.casebook.net/)

- [Knowledge Base](https://gohub.casebook.net/knowledge)
- [Video Library](https://gohub.casebook.net/video-library)
- [Still Need Help?](https://gohub.casebook.net/knowledge/kb-tickets/new)

Open main navigation

Close main navigation

- [Knowledge Base](https://gohub.casebook.net/knowledge)
- [Video Library](https://gohub.casebook.net/video-library)
- [Still Need Help?](https://gohub.casebook.net/knowledge/kb-tickets/new)
- [More support](https://gohub.casebook.net/knowledge/kb-tickets/new)

 Hi. How can we help?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://gohub.casebook.net/knowledge)
2. [Reporting](https://gohub.casebook.net/knowledge/reporting)
3. [Calculated Fields](https://gohub.casebook.net/knowledge/reporting#calculated-fields)

# Helpful Calculated Fields in Casebook

## Casebook allows you to define new fields in the dataset, named calculated fields. The following fields can be copy and pasted into Casebook.

#### Length of First Name

find(" ", \[person\_name\], 1)

**Notes:**

- This is assuming you don't have a middle name. If you do, it will get wrapped into the last name. This is assuming you don't have last names longer than 20 characters.
- If you do, change the last argument of last name to be more than 20.
- This is assuming your first and last name is separated by a space (ie. there's no space in your first name).

#### First Name

mid(\[person\_name\], 1, \[Length of First Name\])

**Notes:**

- This is assuming you don't have a middle name. If you do, it will get wrapped into the last name. This is assuming you don't have last names longer than 20 characters.
- If you do, change the last argument of last name to be more than 20.
- This is assuming your first and last name is separated by a space (ie. there's no space in your first name).

#### Last Name

mid(\[person\_name\], \[Length of First Name\], 20)

**Notes:**

- This is assuming you don't have a middle name. If you do, it will get wrapped into the last name. This is assuming you don't have last names longer than 20 characters.
- If you do, change the last argument of last name to be more than 20.
- This is assuming your first and last name is separated by a space (ie. there's no space in your first name).

#### Find Cases Without a Person

if(isempty(\[person\_id\]), “Missing Data”, “Data is entered”)

**Notes:** 

- Starting from the Cases Dataset

#### Find People Without a Case

if(isempty(\[case\_id\]), “Missing Data”, “Data is entered”)

**Notes:** 

- Starting from the People Dataset

#### Finding Children

if(age \< 18, "Under 18", "Over 18")

**Notes:** 

- Using the People Dataset

#### Age Range

IF(isempty(\[age\]),"Not Reported", IF(\[age\]\<=3, "0-3", IF(\[age\]\<=5,"4-5", IF(\[age\]\<=9,"6-9", IF(\[age\]\<=18,"10-18",IF(\[age\]\<=29,"19-29",IF(\[age\]\<=39,"30-39",IF(\[age\]\<=49,"40-49",IF(\[age\]\<=59,"50-59",IF(\[age\]\<=69,"60-69",IF(\[age\]\<=79,"70-79","80+")))))))))))

When adding additional age ranges, please add an additional closed parenthesis per age range that you've added to the end of the calculation. 

- The age ranges in the formula can be altered to your specific needs.

### Gender Identity

IF(\[gender\_identity\] = "Woman (girl, if child)", "Female", IF(\[gender\_identity\] = "Man (boy, if child)", "Male",  IF(OR(\[gender\_identity\] = "Transgender",  \[gender\_identity\] = "Questioning",   \[gender\_identity\] = "Culturally specific",   \[gender\_identity\] = "Different identity",   \[gender\_identity\] = "Doesn't know"), "Other", IF(OR(\[gender\_identity\] = "Prefers not to answer",  \[gender\_identity\] = "Undisclosed",   \[gender\_identity\] = "Unknown"), "Undisclosed",          "Other"))))

**Notes:**

- Using people or gender\_identity datasets

### Point-in-Time Calculated Fields

#### Scenario 1: Started in the Reporting Period

AND(\[Start Date\]\>=\[Reporting Period Start\],\[Start Date\]\<=\[Reporting Period Start\])

**Notes:** 

- *Start Date* and *Reporting Period Start* need to be defined.

#### Scenario 2: Ended in Reporting Period

AND(\[End Date\]\>=\[Reporting Period Start\],\[End Date\]\<=\[Reporting Period End\])

**Notes:** 

- *End Date, Reporting Period End* and *Reporting Period Start* need to be defined.

#### Scenario 3: Started before the beginning of the Reporting Period & Ended after the reporting period

AND(\[End Date\]\<\[Reporting Period Start\],\[Start Date\]\>\[Reporting Period End\])

**Notes:** 

- *Start Date, End Date, Reporting Period End* and *Reporting Period Start* need to be defined.

#### Scenario 4: Started before the beginning of the Reporting Period, No End Date

AND(ISEMPTY(\[Start Date\]),\[End Date\]\<=\[Reporting Period Start\])

**Notes:** 

- *Start Date, End Date,* and *Reporting Period Start* need to be defined.

#### Combining Scenarios

IF(OR(\[Scenario 1\],\[Scenario 2\]),"In Reporting Period", "NOT in Reporting Period")

**Notes:** 

- You can combine as many scenarios as needed.
- Scenario 1, Scenario 2, etc, need to be replaced with the above formulas.

#### Example of ALL Scenarios Above

IF(OR(AND(\[Start Date\]\>=\[Reporting Period Start\],\[Start Date\]\<=\[Reporting Period End\]),AND(\[End Date\]\>=\[Reporting Period Start\],\[End Date\]\<=\[Reporting Period End\]),AND(\[Start Date\]\<\[Reporting Period Start\],\[End Date\]\>\[Reporting Period End\]),AND(ISEMPTY(\[End Date\]),\[Start Date\]\<=\[Reporting Period Start\])),"In Reporting Period","NOT in Reporting Period")

#### **Months Until Next Birthday**

Calculates the number of months remaining until a person's next birthday.​

IF(MONTH(\[birthdate\]) = MONTH(today()), IF(DAY(\[birthdate\])\>= DAY(today()),0,12), IF(MONTH(\[birthdate\]) \> MONTH(today()), MONTH(\[birthdate\]) - MONTH(today()), MONTH(\[birthdate\]) - MONTH(today()) +12))

#### Birthdays in the Next 6 Months

Identifies individuals with birthdays occurring within the next six months.​

IF(MONTH(\[birthdate\]) \> MONTH(today()), MONTH(\[birthdate\]) - MONTH(today()), MONTH(\[birthdate\]) - MONTH(today()) +12) \<= 6

*Note:* This formula considers only the month difference. To account for exact days and ensure accuracy, especially for dates exactly six months apart, an additional day comparison is necessary.​

IF(MONTH(\[birthdate\]) \> MONTH(today()), MONTH(\[birthdate\]) - MONTH(today()), MONTH(\[birthdate\]) - MONTH(today()) +12) + IF(DAY(\[birthdate\]) \<= DAY(today()) \> 0, 0, 1) \<= 6

- [Getting Started With Casebook](https://gohub.casebook.net/knowledge/getting-started-with-casebook#main-content)

    - [Casebook Overview](https://gohub.casebook.net/knowledge/getting-started-with-casebook#casebook-overview)
    - [Getting Started for New Users](https://gohub.casebook.net/knowledge/getting-started-with-casebook#getting-started-for-new-users)
    - [Services in Casebook](https://gohub.casebook.net/knowledge/getting-started-with-casebook#services-in-casebook)
    - [Notes](https://gohub.casebook.net/knowledge/getting-started-with-casebook#notes)
- [Admin](https://gohub.casebook.net/knowledge/admin#main-content)

    - [Casebook Security](https://gohub.casebook.net/knowledge/admin#casebook-security)
    - [Roles and Permissions](https://gohub.casebook.net/knowledge/admin#roles-and-permissions)
    - [User Management](https://gohub.casebook.net/knowledge/admin#user-management)
    - [Notifications](https://gohub.casebook.net/knowledge/admin#notifications)
    - [Data](https://gohub.casebook.net/knowledge/admin#data)
    - [Field Configuration](https://gohub.casebook.net/knowledge/admin#field-configuration)
    - [Dynamic Fields](https://gohub.casebook.net/knowledge/admin#dynamic-fields)
    - [Forms](https://gohub.casebook.net/knowledge/admin#forms)
    - [Implementation & Adoption](https://gohub.casebook.net/knowledge/admin#implementation-adoption)
- [People](https://gohub.casebook.net/knowledge/people)
- [Intake](https://gohub.casebook.net/knowledge/intake)
- [Engage](https://gohub.casebook.net/knowledge/engage#main-content)

    - [Text Messages](https://gohub.casebook.net/knowledge/engage#text-messages)
    - [Configuration](https://gohub.casebook.net/knowledge/engage#configuration)
    - [Notes](https://gohub.casebook.net/knowledge/engage#notes)
- [Track](https://gohub.casebook.net/knowledge/track)
- [Access](https://gohub.casebook.net/knowledge/access)
- [Workflow & Tasks](https://gohub.casebook.net/knowledge/workflow-tasks)
- [Reporting](https://gohub.casebook.net/knowledge/reporting#main-content)

    - [Overview](https://gohub.casebook.net/knowledge/reporting#overview)
    - [Datasets](https://gohub.casebook.net/knowledge/reporting#datasets)
    - [Dashboards](https://gohub.casebook.net/knowledge/reporting#dashboards)
    - [Pre-built Reports](https://gohub.casebook.net/knowledge/reporting#pre-built-reports)
    - [Custom Reports](https://gohub.casebook.net/knowledge/reporting#custom-reports)
    - [Data Visualizations](https://gohub.casebook.net/knowledge/reporting#data-visualizations)
    - [Filters](https://gohub.casebook.net/knowledge/reporting#filters)
    - [Calculated Fields](https://gohub.casebook.net/knowledge/reporting#calculated-fields)
    - [Other](https://gohub.casebook.net/knowledge/reporting#other)
- [Audit Logs](https://gohub.casebook.net/knowledge/audit-logs)
- [Integrations](https://gohub.casebook.net/knowledge/integrations#main-content)

    - [Low-code incoming integrations with Zapier](https://gohub.casebook.net/knowledge/integrations#low-code-incoming-integrations-with-zapier)
    - [Custom incoming integrations with Casebook API](https://gohub.casebook.net/knowledge/integrations#custom-incoming-integrations-with-casebook-api)
    - [Custom outgoing integrations with Webhooks](https://gohub.casebook.net/knowledge/integrations#custom-outgoing-integrations-with-webhooks)
- [Program Area Specific](https://gohub.casebook.net/knowledge/program-area-specific#main-content)

    - [VOCA Reporting](https://gohub.casebook.net/knowledge/program-area-specific#voca-reporting)
- [Customer Support](https://gohub.casebook.net/knowledge/customer-support#main-content)

    - [Getting Unstuck](https://gohub.casebook.net/knowledge/customer-support#getting-unstuck)
    - [Account Management](https://gohub.casebook.net/knowledge/customer-support#account-management)
- [Product Release Notes](https://gohub.casebook.net/knowledge/product-release-notes#main-content)

    - [2026](https://gohub.casebook.net/knowledge/product-release-notes#2026)
    - [2025](https://gohub.casebook.net/knowledge/product-release-notes#2025)
    - [2024](https://gohub.casebook.net/knowledge/product-release-notes#2024)
    - [2023](https://gohub.casebook.net/knowledge/product-release-notes#2023)
    - [2022](https://gohub.casebook.net/knowledge/product-release-notes#2022)
    - [2021](https://gohub.casebook.net/knowledge/product-release-notes#2021)
    - [2020](https://gohub.casebook.net/knowledge/product-release-notes#2020)
- [Frequently Asked Questions](https://gohub.casebook.net/knowledge/frequently-asked-questions#main-content)

    - [Global](https://gohub.casebook.net/knowledge/frequently-asked-questions#global)
    - [Casebook Calendar](https://gohub.casebook.net/knowledge/frequently-asked-questions#casebook-calendar)
    - [Casebook Services](https://gohub.casebook.net/knowledge/frequently-asked-questions#casebook-services)
    - [Casebook Forms](https://gohub.casebook.net/knowledge/frequently-asked-questions#casebook-forms)
    - [Casebook Notes](https://gohub.casebook.net/knowledge/frequently-asked-questions#casebook-notes)
    - [cb Admin](https://gohub.casebook.net/knowledge/frequently-asked-questions#cb-admin)
    - [cb Track](https://gohub.casebook.net/knowledge/frequently-asked-questions#cb-track)
    - [cb Reporting](https://gohub.casebook.net/knowledge/frequently-asked-questions#cb-reporting)
    - [cb Access](https://gohub.casebook.net/knowledge/frequently-asked-questions#cb-access)
    - [Program Specific](https://gohub.casebook.net/knowledge/frequently-asked-questions#program-specific)

[![logo-raspberry-1-1](https://gohub.casebook.net/hs-fs/hubfs/logo-raspberry-1-1.png?width=32&height=30&name=logo-raspberry-1-1.png "logo-raspberry-1-1")](https://www.casebook.net/)

© 2025 Casebook. All rights reserved.

Casebook Knowledge Base [Video Library](https://gohub.casebook.net/video-library) [Still Need Help?](https://gohub.casebook.net/knowledge/kb-tickets/new)