View All Docs
Product Overview
A down-facing caret indicating that this drawer is closed. Click to open it.
Account Overview
Integrations
A down-facing caret indicating that this drawer is closed. Click to open it.
Transforms
A down-facing caret indicating that this drawer is closed. Click to open it.
Security
A down-facing caret indicating that this drawer is closed. Click to open it.
Transforms   ->

Count by group

The Count by group step counts the number of rows that exist for each unique value in one or more columns. This step is similar to the COUNTIF function in Excel.

Input/output

Our input data is a list of product variants.

We want to know how many product variants we have available at different price points. After connecting the data to this step and setting it up, it gives us the output data of the unique variants amount per unique sale price.

Default settings

By default, this step will count every row as unique and display a "Count" column with the same value as the number of rows in your input table.

Custom settings

To customize these default settings, you'll first select a column or multiple columns you'd like to count unique values for. Then, you'll provide a name for that new column that will display the count of unique values.

In the example above, we wanted tocount unique variants per unique sale price, so we selected Sale Price from the dropdown and named the new column "Variant Count".

We can add multiple columns if we want to count unique values for the combinations of those column values.

To build on the example abve, if we want to count unique variants per quantity sold, we can select both of those columns from the dropdown to see these updated results. The screenshot below shows us that I have 4 variants of "Tees" priced at $25 available in our store.