A Stacked column chart in Power BI uses vertical columns to compare values across categories. Each column can be divided into multiple stacked segments, where each segment represents a subcategory and contributes to the total value of the column.
Stacked column charts are useful for comparing totals across categories while also showing the composition of each category.
🚀 Learn Power BI in 5 Minutes
Skip the long read.
See the key Power BI concepts in one easy-to-follow infographic.
View Infographic →
How to proceed?
Step 1 Import the Data
Launch Power BI Desktop, create a new report page, and import the required data.
Refer Lesson 7 - Power BI Semantic Model to Build Great Visuals
Step 2 Add a Stacked Column Chart
From the Visualizations pane, select the Stacked column chart visual.
Step 3 Add Fields to the Stacked Column ChartAdd the required fields to the appropriate field wells in the Build visual pane:
X-axis – Country
Y-axis – Number of Participants
Legend – Gender
The X-axis displays the categories that you want to compare.
In this example, Country is added to the X-axis.
The Y-axis displays the numerical value for each category.
In this example, Number of Participants is added to the Y-axis.
The Legend divides each column into stacked segments based on a subcategory.
In this example, Gender is added to the Legend field to show the gender distribution within each country.
The Stacked column chart therefore compares the number of participants across countries while also showing the gender composition of each country.
Step 4 Apply Filters
Filters allow you to focus on specific data displayed in the Stacked column chart.
In this example, a Top N filter is applied to the Country field. The Bottom option is selected and the number is set to 6 to display the six countries with the lowest participant counts.
The By value field specifies the measure or numerical value used to rank the categories.
In this example, Number of Participants is used as the By value field to identify the bottom six countries based on participant count.
Step 5 Customize the Stacked Column Chart
You can customize the appearance of the Stacked column chart using the Format visual pane. Power BI provides formatting options under the Visual and General sections.
Select the Stacked column chart and use the available options in the Format visual pane to customize the visual.
You are allowed to choose colors for sub-categories to differentiate them. This improves clarity and helps viewers easily identify and understand the distinctions between various sub-categories within your chart.
Colors
You can customize the colors of the stacked segments to distinguish the different subcategories displayed in the chart.
In this example, different colors can be used to distinguish the gender categories.
Configure the Layout
The available layout settings allow you to adjust the arrangement and spacing of the columns and series.
The Reverse order setting can be used to reverse the order of the series displayed in the stack.
Spacing settings can be used to control the space between categories and series, helping improve the readability of the chart.
Data Labels
Data labels display the numerical value of each segment within a stacked column.
You can customize the available settings such as the font, color, display units, and position of the data labels.
Data labels help users understand the values represented by the individual segments of each column.
Customize Total Labels
Total labels display the total value of all stacked segments in each column.
For example, if a column contains multiple gender segments, the total label displays the combined number of participants for that country.
Power BI supports both data labels for individual stack portions and total labels for the entire aggregated column.
In this example, the total labels are highlighted using red circles, while the data labels are highlighted using blue circles.
Finally, your Stacked column chart is ready. Save the Power BI report to preserve the visual and its formatting.
When to use Stacked column chart?
Stacked column charts are useful when you want to compare values across categories while also showing how different subcategories contribute to the total.
They can also be used to analyze changes in data composition over time when a time-based field is added to the X-axis.
Pros
- Compares total values across different categories.
- Shows how subcategories contribute to the total value.
- Useful for analyzing composition across categories or time periods.
- Supports data labels and total labels for additional value information.
- Uses color-coded segments to distinguish subcategories.
Cons
- Individual stacked segments can be difficult to compare because not all segments share the same baseline.
- Too many subcategories can make the chart difficult to read.
- A large number of categories can make the visual crowded.
- Similar segment sizes can be difficult to compare accurately.
Conclusion
Stacked column charts are useful for comparing values across categories while also showing the composition of each category. Each column represents a category, and the stacked segments show how individual subcategories contribute to the total.
Carefully selecting categories, subcategories, colors, and labels helps create a clear and effective Stacked column chart.
Useful Information
No comments:
Post a Comment