In this blog, you will learn about how to create a 100% stacked bar chart in Power BI, a tool that displays the relative percentage of multiple data series within a single bar, summing to 100%.
Introduction to 100% stacked bar chart in PowerBI
A 100% stacked bar chart in Power BI is a visual representation that displays the relative proportions of multiple data series within individual bars, with each bar summing to 100%.
This chart type is ideal for comparing the percentage contribution of each data series across different categories, providing a clear view of the composition of each category.
It helps in understanding the distribution and proportion of data within each category, making it useful for analyzing the relative significance of different data components.
Dataset description
We’ll utilize a supermarket sales dataset with invoice ID, branch, city, customer type, gender, product line, unit price, quantity, tax, total amount, sale date and time, payment option, COGS, gross margin percentage, gross income, and buy rating in this tutorial. This dataset provides complete sales information, making it excellent for 100% stacked bar chart in PowerBI.
You can access the dataset here.
Description: In this dataset, there following features/columns:
Invoice ID | Unique Identifier for each Invoice |
Branch | There are four branch Site |
City | City where transactions occurred |
Customer Type | Type of Customer – Member or Normal |
Gender | Gender – Male, Female |
Product Line | Type of Product |
Unit Price | Price of a Single Unit of Product |
Quantity | Total Quantity of Product Sell in a Single Purchase |
Tax 5% | 5% of Tax on Cost of Goods Sold |
Total | Total Amount of Items without Tax |
Date | Date of Sale |
Time | Time of Sale |
Payment | Mode of Payment |
COGS (Cost of Goods Sold) | Total Amount of Items with Tax |
Gross Margin Percentage | Total Profit in Percentage |
Gross Income | Total Profit |
Rating | Raing of the purchase in range of 1-10 |
Data Sample:
Procedure to Create 100% Stacked Bar Chart in PowerBI
Step1: Open your PowerBI Desktop on your Device
Step2: Click on Get Data button in Home Ribbon and select Text/CSV.
Step3: Open Prompt box will be open to select your text or csv file.
Step4: After selection of dataset, It will pop up a window for Load OR Transform Data. Click on Load to use data on PowerBI.
Step5: In the following picture, data has been loaded successfully.
Note: Above 5 Steps are common for all types of Visualizations. Left will be according to your requirements.
Step6: Select 100% Stacked Bar Chart from Visualizations Section (Right Hand Side).
Step7: Here, we’ll put the following data (from supermarket_sales) in different fields:
Y-axis | Payment |
X-axis | Quantity (Sum of Quantity) |
Legend | Customer type |
After that you have to click on format your visual. Go to the General click on turn on visual border and the shadow. In the Visual border make the rounded corner of 15 px. After that Go to Visuals and turn on the data labels.
Insights from 100% stacked bar chart in PowerBI
The 100% stacked bar chart shows the distribution of product purchases by payment method and customer type. For Cash payments, 46.68% of products were bought by normal users, and 53.32% by members. With Ewallet, 47.46% were purchased by normal users, and 52.54% by members. For Credit cards, 58.19% were by normal users, and 41.81% by members.
Conclusion:
With a 100% Stacked bar chart, we can view our categorical and numeric data as bars with in proportion of % and create a Stacked bar of another categorical or numeric data. We can get the details of each bar by moving the cursor over the bar and show much details using tooltip field.
If you like this blog, you can share it with your friends or colleague. You can connect with me on social media profiles like LinkedIn, Twitter, and Instagram.
🔔 Follow Me: LinkedIn| Youtube | Instagram | Twitter
👏 Like for this article and subscribe to our newsletter
📰 View more content on my DataSpoof website