In this documentation, we’ll learn How to Create Stacked Area Chart in PowerBI. Firstly, we have to understand what is it and when should we use it.
Introduction to Stacked Area Chart in PowerBI
A stacked area chart in PowerBI displays multiple data series with areas stacked on top of each other, showing their cumulative value over time or other continuous intervals. It highlights the contribution of each series to the total. Use it to visualize part-to-whole relationships, compare trends, and understand the overall composition, such as tracking market share of different products over years.
Dataset description
The supermarket sales dataset is used in this blog. It contains various factors about types customer dimension, branch information and rate of purchase range in the scale of 1 to 10.
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 Stacked Area 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.
Step6: Select Stacked Area Chart from Visualizations Section (Right Hand Side).
Step7: Here, we’ll put the following data in different fields:
X-axis | Payment |
Y-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.
What the Chart indicating
The stacked area chart shows the total number of items sold with various payment methods, separating regular users from members. Credit cards are the most popular way for regular users to buy things, while members slightly prefer cash and e-wallets. The chart does a good job of showing how people’s payment preferences change. The size of each area shows how much of each method’s sales it brings in, highlighting which methods are most popular with different groups of users.
Conclusion
Stacked Area Chart in PowerBI can view our categorical and numeric data as line with containing area in x-axis and y-axis and can create a stack over it. There is a functionality of marker (looks like bubble) present the change of variable. We can get the details of each point by moving the cursor over the area visual 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