--- title: "Funnel Chart" slug: "funnel-chart" updated: 2023-03-10T18:59:52Z published: 2023-03-10T18:59:52Z canonical: "docs.preset.io/funnel-chart" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.preset.io/llms.txt > Use this file to discover all available pages before exploring further. # Funnel Chart 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: ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/funnel.png) 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 Chart](https://portal.document360.io/v1/docs/creating-a-chart): A walkthrough of the overall process of chart selection and creation. - [Using Preset Chart Builder](https://portal.document360.io/v1/docs/using-preset-explore): How to work with the Chart Builder page, the primary interface used when creating a chart. ## **Creating a Funnel Chart** To create the funnel chart, your data needs to resemble the following shape: ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-08-25%20at%2010.24.36%20AM.png) ### 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: ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-08-25%20at%2010.30.14%20AM.png) Here's an explanation of the selections we made in the chart builder interface to generate this chart. | ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-08-25%20at%2010.05.44%20AM.png) | **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:** ```plsql 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). | ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-08-25%20at%2010.06.54%20AM.png) | **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:** ```plsql SELECT stage AS "stage", MAX(count) AS "MAX(count)" FROM db.sales_stages GROUP BY stage ORDER BY "MAX(count)" DESC ```