Sales & operations · About 7 min

Aggregate product sales and find the top products

Sum a numeric sales field by product in DataCello, then use a Top N bar chart to compare the highest-selling products.

Outcome
Create product-level sales totals and a Top N bar chart
Verified against
DataCello 4f9fe8d
A category bar chart in DataCello's visualization workspace
A category bar chart in DataCello's visualization workspace

Columns you need

Prepare a categorical product field and a numeric sales field. Repeated products are expected when each row is an order line. Check that sales is numeric; a currency symbol stored inside text can prevent numeric aggregation.

Build product totals

  1. Select the detail dataset in the sidebar, click Table, then open the Wrangle tab.
  2. Turn on Aggregate Rows.
  3. Set Group By to the product field, choose Sum, and select the sales field as the value.
  4. Name the result Sales Total and inspect the preview.
  5. Click Create Dataset to create one row per product.

This aggregate operation uses one group-by column. It is not a multi-key grouping workflow for product and store together.

Compare the Top N

  1. Select the derived dataset, click the Visualize tab, and choose a bar chart.
  2. Set the product field on X Axis and sales total on Y Axis.
  3. Turn on Filter to Top N and enter the count in Top N.
  4. Compare the bars and values to see where sales are concentrated.
Top five products by sales in a DataCello bar chart
Top five products by sales in a DataCello bar chart

Interpret the result

A ranking identifies high totals but does not explain why they are high. Compare units, price, period, or campaign status before making a decision. Chart image export and shared dashboards are not part of the current app.

DataCello for Mac

Try it with your own data.

Start by importing and inspecting your dataset.

Download on the Mac App Store