Can I perform calculations on my data?

When choosing the data source for your chart it is possible to perform a few basic calculations on the chart. For more advanced calculations we'd recommend you process the data first before importing it.

The following calculations can be applied to the value(s) of your Y axis data when grouping by a column:

  • Average
  • Sum (total)
  • Count
  • Minimum value
  • Maximum value
  • First value
  • Last value

Applying the group calculation

To apply these calculations to your data, click on the "Data" tool when editing your chart. For each series you would like to group, pick both the column you would like to group by and the calculation to perform.

The group by column is the column that contains your duplicate values. In the screenshot below if you wanted to group by country you would choose column B. Your Y value column will then be modified based on calculation you choose. The default is average.

Examples

Given this simple table of data, the top 10 car manufacturers based on sales of 2012, we can make a number of graphs just by grouping the data together.

ManufacturerCountrySales
Volkswagen Germany 8,576,964
Toyota Japan 8,381,968
Hyundai South Korea 6,761,074
GM USA 6,608,567
Honda Japan 3,830,954
Nissan Japan 3,830,954
Ford USA 3,123,340
PSA France 2,554,059
Suziki Japan 2,483,721
Renault France 2,302,769

Number of sales by manufacturer

If we don't group by anything, leaving the data as-is, and we get this:

X column: A (Manufacturer)
Y column: C (Sales)

Total sales by country

To get a total sales by country:

X column: B (Country)
Y column: C (Sales)
Group by: B (Country)
Calculation: Sum of values

Number of manufacturers by country

To get number of manufacturers by country:

X column: B (Country)
Y column: C (Sales)
Group by: B (Country)
Calculation: Count