Monday, 6 July 2026

Creating Mixed Charts in Apache Superset for Sales & Profit Analysis

  

A mixed chart (also called a combo chart) is a visualization that combines two or more chart types in a single view, typically sharing the same X-axis but using different Y-axes or scales.

 

In tools like Apache Superset, mixed charts are commonly used to compare related business metrics that behave differently but are connected.

 

A mixed chart allows you to:

·      Combine line + bar, line + area, or even multiple lines

·      Compare metrics with different scales (e.g., Sales vs Profit)

·      Show relationships between trends and magnitude

·      Use a shared dimension like time (order date)

 

Example in business context:

·      Sales (Bar chart) shows volume of revenue

·      Profit (Line chart) shows profitability trend

·      Both plotted over Order Date

 

This helps answer questions like "Are we growing revenue while maintaining profit margins?"

 

Why Mixed Charts are Useful?

Without a mixed chart:

·      You might need two separate charts

·      Harder to see correlation between metrics

 

With a mixed chart:

·      Trends become visually comparable

·      Easier decision-making

·      Better executive dashboards

 

store_sales.csv

order_date,quarter,region,sales,profit,discount
2025-01-05,Q1,South,1200,240,0.10
2025-01-12,Q1,South,1800,360,0.12
2025-01-20,Q1,East,1500,210,0.15
2025-02-02,Q1,West,2200,440,0.08
2025-02-15,Q1,North,1700,255,0.11
2025-03-01,Q1,East,2000,300,0.09
2025-03-10,Q1,South,2500,500,0.07
2025-03-18,Q1,West,3000,600,0.05
2025-03-25,Q1,North,2800,420,0.06
2025-01-08,Q1,East,1300,195,0.13
2025-01-15,Q1,West,2100,315,0.10
2025-01-22,Q1,North,1600,240,0.12
2025-02-05,Q1,South,1900,285,0.09
2025-02-12,Q1,East,2300,345,0.08
2025-02-20,Q1,West,2400,480,0.07
2025-02-28,Q1,North,1750,262,0.11
2025-03-05,Q1,South,2600,520,0.06
2025-03-12,Q1,East,2100,315,0.09
2025-03-20,Q1,West,3100,620,0.05
2025-03-28,Q1,North,2950,442,0.06
2025-04-03,Q2,East,2600,390,0.10
2025-04-10,Q2,South,3100,620,0.08
2025-04-18,Q2,West,3400,680,0.07
2025-04-25,Q2,North,2900,435,0.09
2025-05-02,Q2,East,3300,495,0.11
2025-05-10,Q2,South,3600,720,0.06
2025-05-18,Q2,West,3800,760,0.05
2025-05-25,Q2,North,3200,480,0.08
2025-06-02,Q2,East,3000,450,0.09
2025-06-10,Q2,South,3700,740,0.07
2025-06-18,Q2,West,4000,800,0.06
2025-06-25,Q2,North,3500,525,0.08
2025-04-05,Q2,South,2800,420,0.10
2025-04-12,Q2,East,2700,405,0.11
2025-04-20,Q2,West,3600,720,0.06
2025-04-28,Q2,North,3000,450,0.09
2025-05-05,Q2,East,3400,510,0.10
2025-05-12,Q2,South,3900,780,0.05
2025-05-20,Q2,West,4100,820,0.06
2025-05-28,Q2,North,3300,495,0.08
2025-06-05,Q2,East,3100,465,0.09
2025-06-12,Q2,South,3800,760,0.07
2025-06-20,Q2,West,4200,840,0.05
2025-06-28,Q2,North,3600,540,0.08
2025-07-05,Q3,South,2500,500,0.10
2025-07-12,Q3,East,2700,405,0.12
2025-07-20,Q3,West,3200,640,0.08
2025-07-28,Q3,North,3000,450,0.09
2025-08-05,Q3,South,2900,580,0.07
2025-08-12,Q3,East,3100,465,0.10
2025-08-20,Q3,West,3500,700,0.06
2025-08-28,Q3,North,3300,495,0.08
2025-09-05,Q3,South,3100,620,0.06
2025-09-12,Q3,East,3300,495,0.09
2025-09-20,Q3,West,3700,740,0.05
2025-09-28,Q3,North,3400,510,0.07
2025-07-08,Q3,East,2600,390,0.11
2025-07-15,Q3,West,3000,600,0.09
2025-07-22,Q3,North,2800,420,0.10
2025-07-30,Q3,South,2700,540,0.08
2025-08-07,Q3,East,3200,480,0.09
2025-08-14,Q3,West,3600,720,0.06
2025-08-22,Q3,North,3400,510,0.07
2025-08-30,Q3,South,3000,600,0.08
2025-09-07,Q3,East,3400,510,0.08
2025-09-14,Q3,West,3800,760,0.05
2025-09-22,Q3,North,3500,525,0.07
2025-09-30,Q3,South,3200,640,0.06
2025-10-05,Q4,East,3000,450,0.10
2025-10-12,Q4,South,3400,680,0.08
2025-10-20,Q4,West,3800,760,0.07
2025-10-28,Q4,North,3600,540,0.09
2025-11-05,Q4,East,3200,480,0.11
2025-11-12,Q4,South,3600,720,0.06
2025-11-20,Q4,West,4000,800,0.05
2025-11-28,Q4,North,3700,555,0.08
2025-12-05,Q4,East,3400,510,0.09
2025-12-12,Q4,South,3800,760,0.07
2025-12-20,Q4,West,4200,840,0.06
2025-12-28,Q4,North,3900,585,0.08
2025-10-08,Q4,South,3100,620,0.09
2025-10-15,Q4,East,3300,495,0.10
2025-10-22,Q4,West,3900,780,0.06
2025-10-30,Q4,North,3700,555,0.08
2025-11-07,Q4,East,3500,525,0.09
2025-11-14,Q4,South,3900,780,0.05
2025-11-22,Q4,West,4100,820,0.06
2025-11-30,Q4,North,3800,570,0.08
2025-12-07,Q4,East,3600,540,0.09
2025-12-14,Q4,South,4000,800,0.06
2025-12-22,Q4,West,4300,860,0.05
2025-12-30,Q4,North,4100,615,0.07

   

Follow below step-by-step procedure to build the Mixed chart.

 

Step 1: create store_sales dataset.

 

Data -> Upload CSV to database

 


Upload store_sales.csv file.

Choose the Database and Schema name where you want to upload the csv file.

Give table name as store_sales.

 


 

Expand Columns section.

·      Select all the columns.

·      Set Column data types to {"order_date": "datetime64[ns]", "quarter": "string", "region" : "string", "sales" : "int32", "profit" : "int32", "discount" : "float32"}

 

Click on Upload button to upload the csv to the table store_sales.

 

Navigate to the datasets listing page.

 

You can able to see store_sales dataset.

 


Step 2: Create mixed chart.

 

Click on store_sales dataset.

 


Click on ‘View all charts’ link.

 

Select Mixed chart.

 

      

There are three main sections in Area Chart.

a.   Shared query fields

b.   Query A

c.    Query B

 


 

   

Expand ‘Shared query fields’, drag and drop order_date column to the X-axis.

 


Expand 'Query A' section, drag and drop sales column to the Metrics section and select aggregate as SUM.

 


Expand 'Query B' section, drag and drop profit column to the Metrics section of Query B, and select aggregate as SUM.

 


Click on Create chart button, you can able to see the Mixed chart like below.

 


If you want to see Quarterly data, set the time grain to Quarter.

 


Chart will be rendered like below.

 

Render sales as bar chart

Navigate to Customize tab and set the series type to bar.

 


You can able to see that the chart is rendered like below.

 


That’s it, you're good to go.

 

  

Previous                                                    Next                                                    Home

No comments:

Post a Comment