---
title: "The Uncount function for Tidy data"
slug: "uncount-function-to-tidy-data"
updated: 2025-10-15T15:45:18Z
published: 2025-10-15T15:45:18Z
canonical: "userguide.dataclassroom.com/uncount-function-to-tidy-data"
---

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

# The Uncount function for Tidy data

Turn Sample Counts into Individual Observations - **Uncount**![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1760542238265.png)

Sometimes you may have some data that have been aggregated by **counting the number of observations**. This is where the **uncount** function is useful. This function is found under **Advanced** in the left-hand menu:![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/uncount-2.png)

To do this:

1) Set your counted variable to **Sample Count** type.

![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/sample%20count.png)

2) Go to the hamburger menu, select **Advanced**, and then **Uncount**. You will now see this. Select the variable you wish to "uncount" into single observations.

![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/sample%20count%202.png)

3) You should now see a new variable with all your "sample count" values separated out into individual observations.

![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/final.png)

**NOTE**First you need to ensure that the column with the number of observations has been set to the [correct type](/v1/docs/data-types): **Sample count** as in our [example dataset](https://dataclassroom.com/en/dataseteditor/58bb46ca-ecc0-4cc0-8122-07046990ae40).
