Funnel Chart
  • 10 Mar 2023
  • 1 Minute to read
  • Dark
    Light

Funnel Chart

  • Dark
    Light

Article summary

A funnel chart visualizes stages in a pipeline of some sort. Funnel Charts are extremely common in sales, marketing, product, and operations teams. Here's an example of a sales funnel, visualized using this chart:

In this documentation article, we'll showcase how to generate the above funnel chart both from raw, un-aggregated data and from aggregated data.

Reference Content

If you're new to visualizing data in Preset, we recommend the following reference articles:

Creating a Funnel Chart

To create the funnel chart, your data needs to resemble the following shape:

Funnel Chart from Unaggregated Data

If your data is unaggregated, you'll need to specify the relevant column and how you want the values in that column to be aggregated. Here's an overview of the before and after snapshots of the data:

Here's an explanation of the selections we made in the chart builder interface to generate this chart.

Dimensions

  • We recommend choosing one column for the dimension. The unique values in this column will be used to determine the different stages in the funnel pipeline.

Metric

  • Define how you want each stage's numerical value to be calculated.

Here's the SQL query that Preset generated:

SELECT stage AS "stage", count(DISTINCT user_id) AS "COUNT_DISTINCT(user_id)"
FROM db.sales_stages
GROUP BY stage
ORDER BY "COUNT_DISTINCT(user_id)" DESC

Funnel Chart from Aggregated Data

If your data is already aggregated by stage, then you can select an aggregation function that yields an identical value for aggregated values (e.g. MIN or MAX).

Dimensions

  • We recommend choosing one column for the dimension. The unique values in this column will be used to determine the different stages in the funnel pipeline.

Metric

  • When working with aggregated data, you will probably want to select MAX() or MIN() as the aggregation function

Here's the SQL query that Preset generated:

SELECT stage AS "stage", MAX(count) AS "MAX(count)" 
FROM db.sales_stages 
GROUP BY stage 
ORDER BY "MAX(count)" DESC

Was this article helpful?

What's Next