Count by group

The Count by group step allows you to quickly summarize data by counting occurrences within your dataset. It’s particularly useful for flagging duplicate values that exist in a dataset.  

Building challenge

  • Directly below our “Find total revenue and units sold by SKU” card, add a card titled “Count orders by month” and drop two steps on the card: Remove duplicates and Count by group
  • First, dedupe the dataset by order number to account for orders with multiple SKUs.
    • Pro tip: You should have an arrow going from the Format numbers step to your Remove duplicates step. 
  • Next, count up the number of transactions by month. 

To check your work, take a look at this quick video.

How to use the step

  1. Drag a Count by group step onto the canvas. 
  2. Select the column(s) that you want to count unique values within. 
    • Ex) If you want to count up how many orders were placed each month, you would just select the Month column. 
      • If you want to count up how many orders were placed each month by state, you would select both Month and State. 

Pro tip 

  • If you want to alert the team of duplicates in your dataset, after the Count by group step, use the Filter rows and Email a CSV attachment steps to notify the team about duplicate values. 

To learn more, check out our support docs

Next lesson