# FINDMISSING
URL: https://docs.valsight.ai/findmissing/
Description: FINDMISSING compares two nodes and identifies missing level combinations by marking them as 1 (missing) or 0 (existing), with configurable behavior to check the first node, second node, or both for missing values.
**Category:** [Filtering & data shaping](/filtering-data-shaping/)

## Overview

The **FINDMISSING** function **compares two nodes and marks missing level combinations as 1 and existing ones as 0**. Dependent on the Behavior input, the function finds missing level values in either or both of the nodes.

Use this function when you need to compare two nodes and identify which level combinations are missing in one or both.

## Syntax

`FINDMISSING('Node 1', 'Node 2' [, Behavior])`

## Parameters

| Parameter    | Description                                                     | Type           | Required | Default   |
| ------------ | --------------------------------------------------------------- | -------------- | -------- | --------- |
| **Node 1**   | First input node.                                               | Node reference | Yes      | --        |
| **Node 2**   | Second input node.                                              | Node reference | Yes      | --        |
| **Behavior** | Indicates the leading node which is checked for missing values. | Keyword        | No       | `"FIRST"` |

**Behavior options:**

* `"FIRST"`: The first node is checked for missing values. This is the default.
* `"SECOND"`: The second node is checked for missing values.
* `"BOTH"`: Checks the combined data of Node 1 and Node 2 for missing values.

## Watch out

* When Behavior is `"BOTH"`, all inputs must have the **same dimensionality**.

## Examples

**Input node:** `'Node A'`

| Year | Product | Volume |
| ---- | ------- | ------ |
| 2025 | Alpha   | 10     |
| 2025 | Blade   | 5      |
| 2025 | Droplet | 7      |
| 2026 | Alpha   | 12     |
| 2026 | Blade   | 6      |
| 2026 | Droplet | 9      |

**Input node:** `'Node B'`

| Product | Price |
| ------- | ----- |
| Alpha   | 55    |
| Blade   | 65    |
| Gamma   | 80    |

**Input node:** `'Node C'`

| Year | Product | Volume |
| ---- | ------- | ------ |
| 2025 | Alpha   | 10     |
| 2025 | Gamma   | 5      |

### Checking the first node for missing level values (default)

This example checks Node A for product level values that exist in Node B but are missing in Node A. Droplet is not in Node B, so it is flagged with 1.

**Formula:** `FINDMISSING('Node A', 'Node B')`

**Equivalent to:** `FINDMISSING('Node A', 'Node B', "FIRST")`

| Year | Product | FINDMISSING Result |
| ---- | ------- | ------------------ |
| 2025 | Alpha   | 0                  |
| 2025 | Blade   | 0                  |
| 2025 | Droplet | 1                  |
| 2026 | Alpha   | 0                  |
| 2026 | Blade   | 0                  |
| 2026 | Droplet | 1                  |

### Checking the second node for missing level values

This example checks Node B for product level values that exist in Node A but are missing in Node B. Gamma exists in Node B but not in Node A, so it is flagged with 1.

**Formula:** `FINDMISSING('Node A', 'Node B', "SECOND")`

| Product | FINDMISSING Result |
| ------- | ------------------ |
| Alpha   | 0                  |
| Blade   | 0                  |
| Gamma   | 1                  |

### Checking both nodes for missing combinations

With BOTH, the function returns the full cross product of both nodes and flags any combination that is missing from either node.

**Formula:** `FINDMISSING('Node A', 'Node C', "BOTH")`

| Year | Product | FINDMISSING Result |
| ---- | ------- | ------------------ |
| 2025 | Alpha   | 0                  |
| 2025 | Blade   | 1                  |
| 2025 | Droplet | 1                  |
| 2025 | Gamma   | 1                  |
| 2026 | Alpha   | 1                  |
| 2026 | Blade   | 1                  |
| 2026 | Droplet | 1                  |

## Related

| Function          | When to use instead                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------ |
| [IS\_NA](/is-na/) | When you need to detect undefined values in a single node rather than comparing two nodes. |
