In Salesforce, the stacked bar charts can be used for the exact comparison between two or more values in a single bar. To use stacked bar charts, we must need at least two grouping fields in the report.
The Stacked Bar Chart Dashboard can only be used in Salesforce Lightning.
In this Salesforce tutorial, we will learn about creating stacked bar charts in Salesforce; in this, we will see what is a dashboard, what is a stacked bar chart dashboard, and what are the uses of a stacked bar chart.
We will also see how to create a stacked bar chart dashboard in Salesforce Lightning.
Stacked Bar Charts Dashboard in Salesforce
What is a dashboard in Salesforce?
The Salesforce dashboard is a graphical representation of the Salesforce records, which we can arrange per our requirements. The dashboard helps us visually understand changing business conditions so we can make decisions based on the real-time data you have gathered with reports.
What is a stacked bar chart dashboard in Salesforce?
The stacked bar chart allows the user to compare more than two fields in a single bar. To use stacked bar charts, we need at least two grouping fields in the report. The stacked bar chart displays a comparative chart of the different values.
Types of stacked bar chart dashboard in Salesforce:
- Horizontal Stacked Bar Chart.
- Vertical Stacked Bar Chart.
The following are the uses of a Stacked bar chart dashboard:
- The stacked bar chart dashboard provides a user-friendly way to view and compare the data.
- Using a stacked bar chart it is easy to identify trends and patterns. It provides better visualization and understandable data presentation.
- Stacked bar chart dashboard components are easy-to-understand ways to represent data.
Important:
The stacked bar chart component is enabled only when there are at least two or more than two grouping fields in the report. In that, we can use summary and matrix reports to create the stacked bar chart dashboard.
How to Create Stacked Bar Charts Dashboard in Salesforce Lightning
Using the following steps, we can create a bar chart dashboard in Salesforce Lightning.
1. As discussed above, we need at least two grouping fields grouped with either row or column-wise reports to create the dashboard, so here we have an opportunity stacked report grouped by Fiscal Period and Stage.

2. When you log in to Salesforce Org, first you will see the Home Page. Then click on the Gear icon and click on the Setup option. On the Setup page, you can see there is a dotted icon; it’s called App Launcher. Click on it.
Search for the Dashboards, and you will get the Dashboards option under the Items. Click on the Dashboards option.

3. To create the new dashboard, click the New Dashboard button on the right side of the screen.

4. As we click on the new dashboard button, we need to enter the dashboard Name; here, I have entered the Opportunity Stacked chart Dashboard. The Description is optional; we can enter a short intro about our dashboard.
We can select the folder where we want to store our dashboard by clicking the Select Folder button. Here, I have selected the Private Dashboards folder. Then click on the Create button.

5. Then, we need to add a report. For that, click on the + Widget option, and within that, click on the Chart or Table option.

6. Then, you will see the reports, and you can select the report on which you want to create a stacked bar chart dashboard. I will use the opportunity stacked report and click the Select button.

7. After that you can see there are some components. Here, we have to select the Stacked Bar Chart component, and as we click on that, the Preview will be displayed.

8. Now, if you want to change any setting or modify something, scroll down and you will see the following options:
- In the bar chart, we have the X-axis and the Y-axis. We can add fields to the x and y-axis as per our requirements.
- Here, I have selected Fiscal Period to the X-axis and Record Count to the Y-axis.
- In the Stack By field, I have selected Stage, which means every fiscal period bar will show the stages along with the record count to the Y-axis.
- Then click on the Add button.

9. As we click the add button, the dashboard will display the stacked report according to the defined axis and stack. Then, to save the dashboard, click on the Save button.

This is how we can create a stacked bar chart dashboard in Salesforce Lightning.
Conclusion
I hope you have an idea about creating stacked bar charts in Salesforce, in this, we have seen what is a dashboard, what is a stacked bar chart dashboard, and what are the uses of a stacked bar chart. We have also seen how to create a stacked bar chart dashboard in Salesforce Lightning.
You may like to read:
- How to Create Bar Charts Dashboard in Salesforce
- How to Embed Report Chart to Salesforce Record page
- How to Create Report Chart in Salesforce
- How to Create Dashboard and Add to Home Page in Salesforce
- How to Create a Line Chart Dashboard in Salesforce
- Salesforce Dashboard Tutorial
- How to Create Gauge Dashboard Component in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.