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

# Filter Rows

> Drop rows that don't meet a condition, using the same formula grammar as Calculate Variable.

The **Filter Rows** step keeps rows that satisfy a condition — either rows from a specific date onward, or rows whose values meet a criterion you define.

<Frame>
  <img src="https://mintcdn.com/alphacastio/ttF_U-V9HDrmrPbo/images/steps/filter-rows-1.png?fit=max&auto=format&n=ttF_U-V9HDrmrPbo&q=85&s=1c95fc07f63ef7fb916dd830b9ccbd0f" alt="Filter Rows step configuration" width="1366" height="555" data-path="images/steps/filter-rows-1.png" />
</Frame>

The criterion can be a logical function, an arithmetic operation, or a comparison — anything that evaluates to true or false for a row.

<Frame>
  <img src="https://mintcdn.com/alphacastio/ttF_U-V9HDrmrPbo/images/steps/filter-rows-2.png?fit=max&auto=format&n=ttF_U-V9HDrmrPbo&q=85&s=6f89b9ca979b7eedc637b2b28f290f50" alt="Writing a filter condition" width="1349" height="550" data-path="images/steps/filter-rows-2.png" />
</Frame>

<Note>
  Conditions use the same grammar as [Calculate Variable](/steps/calculate-variable). See the [formula reference](/steps/formula-reference) for the full list of operators, comparisons and functions.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Formula reference" icon="function" href="/steps/formula-reference">
    Every operator and function available in a condition.
  </Card>

  <Card title="Sort values" icon="arrow-down-short-wide" href="/steps/sort-rows">
    Order the surviving rows.
  </Card>
</CardGroup>
