You are currently viewing How to create a Line and Stacked column chart in PowerBI

How to create a Line and Stacked column chart in PowerBI

Loading

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 IDUnique Identifier for each Invoice
BranchThere are four branch Site
CityCity where transactions occurred
Customer TypeType of Customer – Member or Normal
GenderGender – Male, Female
Product LineType of Product
Unit PricePrice of a Single Unit of Product
QuantityTotal Quantity of Product Sell in a Single Purchase
Tax 5%5% of Tax on Cost of Goods Sold
TotalTotal Amount of Items without Tax
DateDate of Sale
TimeTime of Sale
PaymentMode of Payment
COGS (Cost of Goods Sold)Total Amount of Items with Tax
Gross Margin PercentageTotal Profit in Percentage
Gross IncomeTotal Profit
RatingRaing 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-axisPayment
Column y-axisQuantity (Sum of Quantity)
Line y-axisTotal (Sum of Total)
Column legendCustomer 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: LinkedInYoutube | Instagram | Twitter

👏 Like for this article and subscribe to our newsletter

📰 View more content on my DataSpoof website