> ## Documentation Index
> Fetch the complete documentation index at: https://docs.humanintelligence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Segments

> Reusable filters that define who's included in your analysis.

A segment is a named filter that defines a specific scope. Instead of rebuilding the same filter logic every time you need it, you define a segment once and reuse it across metrics, scopes, and reports.

Think of segments as labels for groups of people (or records) in your data. When you say "active employees" or "full-time workers," you're describing a segment.

<Frame>
  <img src="https://mintcdn.com/humanintelligence/C4NYfN7LSYBG0V00/assets/images/segments.png?fit=max&auto=format&n=C4NYfN7LSYBG0V00&q=85&s=be899ff304e0f08be748dfd739501cc7" alt="Segments view" width="3248" height="2122" data-path="assets/images/segments.png" />
</Frame>

## Common Segments

Here are a few segments you'll see in most Human Intelligence setups:

<Columns cols={2}>
  <Card title="Active Employees" icon="user-check">
    Workers with a current, active employment status. This is the most common segment and often serves as the default scope for headcount-related metrics.
  </Card>

  <Card title="Full-Time Workers" icon="clock">
    Employees classified as full-time, excluding part-time, temporary, and contingent workers. Useful when you need to isolate metrics to your core workforce.
  </Card>

  <Card title="Internal Candidates" icon="arrow-left-right">
    Current employees who have applied for an open role within the organization. Helpful for tracking internal mobility and promotion pipelines.
  </Card>

  <Card title="Engineering Team" icon="code">
    Employees in engineering-related departments. A good example of a department-specific segment you might create for your organization.
  </Card>
</Columns>

## What Makes a Good Segment

Not every filter needs to be a segment. A good segment is:

* **Reusable** — it applies to more than one metric or analysis
* **Clearly named** — anyone in your organization can understand what scope it describes
* **Documented** — it has a plain-English description explaining who's included and who's not
* **Stable** — it doesn't change so often that dependent metrics become unreliable

## Types of Segments

<Tabs>
  <Tab title="Enumeration Segments">
    Enumeration segments filter by picking values from a list. They're the most common and easiest to understand.

    **How they work:** You choose a dimension (like `department` or `employment_type`) and select which values to include.

    **Example:** A "Full-Time Workers" segment might filter the `employment_type` dimension to include only `Full-Time`.

    **Best for:** Straightforward scopes where you can point to specific values in your data — departments, locations, job levels, employment types.
  </Tab>

  <Tab title="SQL Segments">
    SQL segments use advanced filter logic for scopes that can't be captured by a simple list of values.

    **How they work:** Behind the scenes, these segments use flexible expressions that can combine multiple dimensions, date ranges, and business rules.

    **Example:** An "Employees approaching review eligibility" segment might combine `hire_date`, `last_review_date`, and `employment_status` to find the right scope.

    **Best for:** Complex scopes that depend on multiple conditions, date comparisons, or calculations across dimensions. Your analytics team typically creates and manages these.
  </Tab>
</Tabs>

## Platform vs. Custom Segments

<Columns cols={2}>
  <Card title="Platform Segments" icon="box">
    Default segments provided by Human Intelligence, like `active_workers` or `external_requisitions`. These cover the most common scopes and are ready to use out of the box.
  </Card>

  <Card title="Custom Segments" icon="pen">
    Segments your organization creates for your own needs. If you need a scope that isn't covered by a platform default — like a specific business unit or a custom worker classification — you build it as a custom segment.
  </Card>
</Columns>

You can also create a **platform override** if a default segment doesn't quite match your organization's definition. For example, your definition of "active employees" might differ slightly from the platform default.

<Warning>
  Changing a segment that's used as a scope will affect every metric using that scope. Before editing a widely-used segment, Human Intelligence will show you which metrics depend on it so you can assess the impact.
</Warning>
