You are currently viewing How to create a Clustered bar chart in PowerBI

How to create a Clustered bar chart in PowerBI

Loading

In this blog, you will learn about creating a clustered bar chart in PowerBI, including what it is, when to use it, and step-by-step instructions for creating one effectively.

Introduction to clustered bar chart in PowerBI

A clustered bar chart, also known as a grouped bar chart, is a powerful tool used to compare multiple categories of data across different subcategories. It is especially useful when you need to illustrate the differences within a dataset that is divided into several groups.

Dataset Description

This supermarket sales dataset includes transaction details such as invoice ID, branch, city, customer type, gender, product line, unit price, quantity, tax, total amount (with and without tax), sale date and time, payment mode, COGS, gross margin percentage, gross income, and purchase rating, providing comprehensive insights into sales activities.

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
RatingRating of the purchase in range of 1-10

Data Sample:

Steps to Create Clustered 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.

Note: Power BI lets you import data from more than 160 different types of data sources. For example, you can use Python to scrape data from websites or Excel files.

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.

Note: If your dataset required some enhancement or cleansing, Click on Transform Data either just click on Load.

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 Clustered Bar Chart from Visualizations Section (Right Hand Side).

Step7: Here, we’ll put the following data (from supermarket_sales) in different fields:

Y-axisGender
X-axisQuantity (Sum of Quantity)
LegendCustomer 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. Next Go to Visual and turn the data labels on.

What the Chart indicating:

By using this chart, it’s easy to see how many items were bought by men and women. The chart also shows the difference between regular customers and members:

  • For both men and women, Normal Users bought a few more items than Member Users.
  • A total of 2,869 units were bought by women, while 2,641 units were bought by men.

Conclusion

With a clustered bar chart, we can view our categorical and numeric data as bars and create a side-adjacent bar of another categorical or numeric data. We can get the details of each bar by moving the cursor over the bar as a tooltip.

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