---
title: "Exporting a chart&#8217;s data to a spreadsheet"
date: 2026-12-01
updated: 2026-12-04
author: "Rafael Bennemann"
link: "https://www.gravitykit.com/docs/gravitycharts/exporting-chart-data-to-a-spreadsheet/"
category: "GravityCharts"
---

GravityCharts has no button that exports the numbers behind a chart. Each bar or slice is counted from the form's entries, so an export of those entries holds the same numbers. This guide shows two ways to get them into a spreadsheet: a Gravity Forms export counted with formulas, or a GravityExport export filter that keeps the chart's conditions.

Let's use a research office as an example, with a chart of each institute's publications in 2025:

- The form: Publication records
- **Data Source**: Institute, a Drop Down field
- **Data Operation**: **Entry count**
- **Conditional Logic**: Publication year `is` 2025

## Note what the chart counts

- Go to **Forms**, hover over the form, hover over **Settings** and click **GravityCharts**.
- Hover over the chart's name and click **Edit**.
- Under **Chart Data**, note the **Data Source**, the **Data Operation**, the **Data Field** if the chart has one, and each condition under **Conditional Logic**.

![The Chart Data panel with Data Type By Field (Default), Data Source Institute, Data Operation Entry count, and the condition Publication year is 2025 under Conditional Logic.](https://www.gravitykit.com/wp-content/uploads/2026/12/gravitycharts-chart-data-entry-count-condition-1-27.png)
**Chart Data** with the condition **Publication year** `is` 2025 under **Conditional Logic**.A chart counts active entries only, so entries in the trash or marked as spam are left out
---

## Method 1: Export from Gravity Forms and count in a spreadsheet

### Step 1: Export the entries

- Go to **Forms**, then **Import/Export**. The **Export Entries** tab opens.
- Under **Select a Form**, choose the chart's form.
- Under **Select Fields**, tick the chart's **Data Source** field. If the chart adds up, averages or compares a **Data Field**, tick that field too.

![The Export Entries screen of Gravity Forms with the Publication records form selected. Under Select Fields, the Institute box is ticked and outlined in red, with an arrow pointing at it. The list also shows the five choices of the Research areas field, from Artificial intelligence to Sustainability, as boxes of their own.](https://www.gravitykit.com/wp-content/uploads/2026/12/gravity-forms-export-entries-select-fields.png)
- Leave **Select Status** on **Active**.
- If the chart has conditions, click the plus icon next to **Add a condition** and set the same ones. Choose **All** in **Export entries if All of the following match** when every condition has to match, or **Any** when one of them is enough. For a Drop Down field, the export offers `is`, `is not`, `greater than` and `less than`, so a chart condition such as `is empty` or `has ANY of` needs a GravityExport export filter ([Method 2](#method-2-a-gravityexport-export-filter)).

![The Select Status, Conditional Logic and Select Date Range settings of the Export Entries screen. Select Status is Active, and the condition Publication year is 2025 is outlined in red, with an arrow pointing at it. The Download Export File button is below.](https://www.gravitykit.com/wp-content/uploads/2026/12/gravity-forms-export-entries-condition.png)
- Click **Download Export File**.
The CSV file has a column for each field you ticked, headed with the field's label. A Checkboxes field has no box of its own under **Select Fields**: each of its choices is listed by name, so tick all of them. [Checkboxes and Multi Select fields](#checkboxes-and-multi-select-fields) shows how to count them.

Under **Conditional Logic**, the export matches either all of its conditions or any one of them. If the chart's conditions need both, such as (Region `is` North or Region `is` East) and Year `is` 2025, the export can't match them the same way. A GravityExport export filter can hold them ([Method 2](#method-2-a-gravityexport-export-filter)).

### Step 2: Count each choice

Open the file in a spreadsheet program. The formulas below were checked in LibreOffice Calc. Microsoft Excel and Google Sheets have functions with the same names.

1. Leave the export's own columns as they are. Type the chart's choices in column D, one per row, starting in D2. Write each one exactly as it appears in the file.
2. In E2, enter the formula for the chart's **Data Operation** from the table below. In the formulas, column A is the **Data Source** field and column B the **Data Field**. If your file has the **Data Field** in column A, swap A and B in the formula.
3. Enter the same formula on each row below, with that row's choice: E3 refers to D3, E4 to D4, and so on.

| Data Operation | Formula in E2 |
|---|---|
| **Entry count** | `=COUNTIF(A:A,D2)` |
| **Sum values** | `=SUMIF(A:A,D2,B:B)` |
| **Average values** | `=AVERAGEIF(A:A,D2,B:B)` |
| **Maximum value** | `=MAXIFS(B:B,A:A,D2)` |
| **Minimum value** | `=MINIFS(B:B,A:A,D2)` |

Column E then holds the chart's numbers. When you compare them with the chart:

- The chart rounds sums and averages to two decimals, so an average of 6900.1875 shows as 6900.19.
- An entry with no value in the **Data Field** is left out of the sum, the average and the largest and smallest values, in the chart and in the formulas alike. An entry with 0 counts.
- For a choice with no entries, the chart shows 0, while `AVERAGEIF` shows `#DIV/0!` in LibreOffice Calc. The other formulas show 0.

---

## Method 2: A GravityExport export filter

A GravityExport export filter has the same conditions editor as the chart, groups included, so you can copy the chart's conditions as they are. Its download link gives an Excel (.xlsx) or CSV file of the entries at the time you click it.

- Go to **Forms**, hover over the form and click **Settings**.
- Open the **GravityExport Filters** tab and click **Add New**.
- On the **Export Settings** tab, enter a **Feed Title** and choose the **File Extension**.
- On the **Enabled Fields** tab, click **Disable all**. Then click the arrow on the chart's **Data Source** field, and on its **Data Field** if it has one, to move them to **Enabled Fields**.
- On the **Conditional Logic** tab, click **Add Condition** and set the chart's conditions.
- For an **Entry count** chart on a Checkboxes field, open the **Multiple Rows** tab and choose **Yes, split fields with multiple values into multiple rows**. Splitting leaves the **Data Field** empty on each entry's extra rows, so leave it off for the other operations.
- Click **Save Settings**. On the **GravityExport Filters** list, click **xlsx** or **csv** in the filter's row to download the file.

Count each choice with the formulas in [Step 2](#step-2-count-each-choice). [GravityExport Filters](https://www.gravitykit.com/docs/gravityexport/creating-filter-sets-in-gravityexport/) explains the rest of the export filter's settings.

---

## Checkboxes and Multi Select fields

An entry counts once for each choice it has, so the bars of a chart on one of these fields can add up to more than the number of entries.

In a Gravity Forms export, each choice of a Checkboxes field has a column of its own, headed with the choice's name. A ticked choice shows its name, and an unticked one leaves the cell empty. To count the filled cells of each column without its heading, use an empty column: enter `=COUNTA(A:A)-1` to count column A, `=COUNTA(B:B)-1` to count column B, and so on.

In a GravityExport export filter with **Yes, split fields with multiple values into multiple rows**, each ticked choice of a Checkboxes field gets a row of its own, so `=COUNTIF(A:A,D2)` counts it. The entry's other fields are filled on its first row only. [The "Enable multi-row splitting" setting](https://www.gravitykit.com/docs/gravityexport/enable-multi-row-splitting-setting/) shows an example.

Without splitting, GravityExport puts the ticked choices of a Checkboxes field in one cell. Both exports write a Multi Select field that way too, with or without splitting: one column, with an entry's choices separated by a comma and a space, as in `English, German`. Count the cells that contain each choice, with the choices typed in column D as in [Step 2](#step-2-count-each-choice):

```
=COUNTIF(A:A,"*"&D2&"*")
```

The asterisks stand for any text before and after the choice. If one choice's name is part of another's, such as Java and JavaScript, the formula counts the cells with JavaScript under Java too.

---

## Choices with values

If a field's choices use **Show Values**, both exports hold each choice's value, while the chart's bars show the labels unless the chart has **Use values for labels** turned on. A Publication type choice labeled Journal article with the value `journal` comes out as `journal`, so type the values in column D.

---

## Showing the numbers on a page

If you have GravityMath, a summary shows the count or total for the choices of a Drop Down or Radio Buttons field as a table on a page, with no spreadsheet. A choice with no entries gets no row, where the chart shows a bar of 0. This shortcode gives the example chart's numbers, with the form's ID in `form_id`, Institute as field 2 and Publication year as field 3:

```
[gravitymath action="summary" form_id="12" group_by="2" operation="count" filter="filter_3=2025"]
```

[How to display summaries using a block, widget, or shortcode](https://www.gravitykit.com/docs/gravitymath/how-to-display-summaries-using-gvmath/) lists the summary's other settings, and [Charting averages, totals and counts by field](https://www.gravitykit.com/docs/gravitycharts/charting-averages-totals-and-counts/) explains each **Data Operation**.