---
title: "How Pigment Handles Blank Cells"
slug: "how-pigment-handles-blank-cells"
description: "Learn how Pigment's sparse engine handles blank cells in formulas, enhancing computation speed and affecting operator behavior in data analysis."
tags: ["Formula Behavior", "Modeling Formulas", "Sparse Engine"]
updated: 2026-04-16T12:46:10Z
published: 2026-04-16T12:46:10Z
---

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

# How Pigment Handles Blank Cells

Pigment has a sparse engine, meaning that it natively stores only values, and works faster when there are fewer values in the Metric (and more blanks). This article sets out how blanks are treated in formulas.

## What is sparsity and why is Pigment’s engine sparse?

A sparse engine means that empty values are not filled by default with a 0 or a FALSE: your datasets can include blanks. This allows for much faster computation than in a data-dense engine.

For more information about performance and sparsity, see [Leverage sparsity for optimal performance](/v1/docs/leverage-sparsity-for-optimal-performance).

## Implications of sparsity

Pigment has its own heuristic governing how simple operators should behave in a sparse context. They behave differently depending on whether the datasets on each side of the operators have the same Dimensions or not. There are two main types of behavior:

- one for addition, subtraction and `OR` operators
- one for multiplication, division and `AND` operators

## Formulas featuring Metrics with the same Dimensions

In the examples below, the input Metrics and the output Metric all have **Product** and **Country** as Dimensions. The behavior depends on the operator:

- ### Addition/subtraction/`OR`:
  - The output Metric has the same Dimensions as the input Metrics.
  - When a blank value is combined with a numeric value, the result is always the numeric value.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/23e999db-b4a4-4689-888c-28231abbaea3.png)

- ### Multiplication/Division/`AND`:
  - The output Metric has the same Dimensions as the input Metrics.
  - When a blank value is combined with a numeric value, the result is always blank.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/70371c41-d8bf-4b94-973c-0921eea2fe88.png)

## Formulas featuring Metrics with one common Dimension

When the Metrics have a Dimension in common, but one Metric has an additional Dimension, the resulting Metric has both Dimensions.

In the examples below, the first Metric has both **Country**and **Product**, while the second Metric only has **Product**. The output has both **Country**and **Product**. The behavior depends on the operator:

- ### **Addition/subtraction/**`OR`**:**
  - The blank values of the Metric with multiple Dimensions remain blank in the output Metric.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/42339dc8-9872-4060-9577-88d1d4f2c539.png)

- ### **Multiplication/division/**`AND`**:**
  - The blank values in either Metric remain blank in the output Metric.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/9a560921-8f2f-4745-9f3f-a3fc859105ac.png)

The same happens when a constant or scalar is introduced. Below, the first Metric has both **Country**and **Product**, while the second Metric only has **Product**. The output has both **Country**and **Product**. The behavior depends on the operator:

- ### **Addition/subtraction/**`OR`**:**
  - The blank values of the Metric with multiple Dimensions remain blank in the output Metric.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/296fc590-44e9-47df-8e8e-f0c759ee9cf1.png)

- ### **Multiplication/division/**`AND`**:**
  - The blank values in either Metric remain blank in the output Metric.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/05549880-8ca6-4deb-b2ed-6dc6f0939595.png)

> ℹ️ **Note**
> 
> You could switch this behavior to that outlined in [Formulas Featuring Metrics with the Same Dimensions](/v1/docs/how-pigment-handles-blank-cells#formulas-featuring-metrics-with-the-same-dimensions) by aligning the Metrics’ Dimensions. See [Add modifier](/v1/docs/add-modifier) for example.

## Formulas featuring Metrics with no common Dimensions

When the Metrics have no common Dimensions, the resulting Metric has all their Dimensions. In the examples below, the first Metric has **Product**, while the second Metric has **Country**. The output has both **Country**and **Product**. The behavior is the same for either group of operators:

- ### **Addition/subtraction/**`OR`**:**
  - The blank values in either Metric remain blank in the output Metric.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/e03b68de-7429-4be6-8435-4720cb405076.png)

- ### **Multiplication/division/**`AND`**:**
  - The blank values in either Metric remain blank in the output Metric.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/eca130a1-f242-4b2f-863f-eb27af71bd30.png)

> ℹ️ **Note**
> 
> You could switch this behavior to that outlined in [Formulas Featuring Metrics with the Same Dimensions](/v1/docs/how-pigment-handles-blank-cells#formulas-featuring-metrics-with-the-same-dimensions) by aligning the Metrics’ Dimensions. See [Add modifier](/v1/docs/add-modifier) for example.

## Formulas featuring a Metric and a constant

When a formula features a Metric and a constant or scalar, the blank values in the input Metric remain blank in the output Metric. The behavior is the same for either group of operators:

- ### **Addition/subtraction/**`OR`**:**

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/ae59d833-f133-4a5a-a6c3-3f84d0bbcb24.png)

- ### **Multiplication/division/**`AND`**:**

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/42b19de6-b0df-4cc4-bb5a-f1757096d330.png)

## Blank cells in the Boolean data type

Most of this article deals with blanks in Metrics of type number. But blanks also exist in Booleans. A Boolean that has not been used is considered blank. Pigment distinguishes between blank and false Booleans by graying out blanks. See below the different appearances a Boolean can have.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/3d2bdd9a-7c9f-4a69-b1dd-7e4a136b1f2d.png)

> [!WARNING]
> **⚠️****Important**
> 
> Blank and false Booleans look a little similar as neither has a checkmark. However, when [Hide empty rows and columns](/v1/docs/filter-data-pigment#hide-empty-rows-or-columns) returns values without a checkmark, it is because those values are false, not empty.

## Learn more

- [Filter Data in Pigment](/v1/docs/filter-data-pigment)
- [Add modifier](/v1/docs/add-modifier)
- [Compare Blocks using Operators](/v1/docs/)
