You are currently viewing How to create a Pie chart in PowerBI

How to create a Pie chart in PowerBI

Loading

In this blog, we’ll learn How to Create Pie Chart in PowerBI. Firstly, we have to understand what is it and when should we use it.

Introduction to Pie chart in PowerBI

Pie Chart is a circle chart and uses slices to visualize the contribution of some data/groups.

Dataset description

The dataset has columns for invoice ID, branch, city, customer type, gender, product line, unit price, quantity, tax, total amount, sale date and time, payment choice, 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

Sample of Data:

Steps to create Pie 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 Pie Chart from Visualizations Section (Right Hand Side).

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

Legend

Payment

Values

Quantity (Sum of Quantity)

Details

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, In the details label select category percent of total.

Insights from the Pie chart

The pie chart in PowerBI shows how people spend their money using different payment ways, broken down by the type of user. Major purchases are made with cash; regular users spend 57,55K (17.82%) and members spend 54,66K (16.92%). Only a little more than half of members (51.79K) use e-wallets compared to normal users (58.2K, or 18.02%). Overall, credit cards aren’t as popular. Regular users spend $43,000 (13.31%), while members spend $57,77,000 (17.89%). This chart shows that Cash and e-wallets are popular, but Credit cards aren’t used as much, even though users say they like them better.

Conclusion

With pie charts, we can visualize the proportional distribution of categorical data as segments of a circle, where each segment represents a part of the whole. In a pie chart, the entire circle represents the total value, while the individual slices represent the numerical value of each category. The size of each piece is proportional to its contribution to the total.

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. If you have any doubt regarding implementation fell free to comment.