In this documentation, we’ll learn How to Create Line and Stacked Column Chart in PowerBI. Firstly, we have to understand what is it and when should we use it.
Introduction to Line and Stacked column chart in PowerBI
A hybrid visualization of line charts and stacked column charts to show trends and multiple data series comparisons in a single chart.
Dataset description
In this blog, we’ll use a supermarket sales dataset that includes order ID, branch, city, customer type, gender, product line, unit price, quantity, tax, total amount, sale date and time, payment method, cost of goods sold (COGS), gross margin percentage, gross income, and buy rating.
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 Line and Stacked Column 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 Line and Stacked Column Chart from Visualizations Section (Right Hand Side).
Step7: Here, we’ll put the following data (from supermarket_sales) in different fields:
X-axis | Payment |
Column y-axis | Quantity (Sum of Quantity) |
Line y-axis | Total (Sum of Total) |
Column legend | Customer type |
After that, you need to click on “format your visual.” To turn on the visible border and shadow, go to General and click on it. Give each corner of the Visual border a 15-px round shape. After that, go to Visuals and get the data titles to show up.
What the Chart indicating:
The line and stacked column in PowerBI shows how the number of items sold affects the total value of the sales for both regular users and members who use different payment methods.
With 112.2K in cash payments, 1896 goods were sold, with members selling a little more (885 units) than regular users (1011 units). E-wallets were used fairly evenly, and they helped bring in 110 thousand dollars in sales, with users buying 948 units more than anyone else.
Credit cards were the most popular way for regular users (1002 units), but the total sales were the lowest (100.8K), which means that the average transaction value was lower than with cash and e-wallets.
Conclusion:
Overall, Line and Stacked Column Chart in PowerBI can use functionality of Line Chart and Stacked Column Chart at a same time in a Chart. We can get the details of each column or line by moving the cursor over the line and column, and can 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