Perform Data Analytics using Power BI
Generate a report that contains various visualizations.
A Power BI report is a multi-perspective view of a dataset, with visuals that represent different findings and insights from that dataset. It can have a single visual or pages full of visuals. Power BI reports are essentially graphics that help describe the dataset. In this blog, I have explored Power BI for performing data analytics and generating reports with various visualizations.
To begin with this practical, load all the excel files in Power BI one after the other. Below is a brief description of the data.
- Customer Details: This datasheet has details about the customer including customer id and customer name.
- Order Details: This datasheet has attribute values for Order id and Order Date.
- Sales Details: The sales details datasheet includes data regarding Order ID, Customer ID, Place ID, Product ID, Sales ID, Sales, Quantity, Discount, and Cost.
- Region Details: This datasheet has data regarding the city, state, and place id.
- Product Details: The product details datasheet has all the data about every product like Product ID, Category, Sub-Category, and Product Name.
After loading the data in Power BI, I have added a new column in the Sales Details named Gross Profit which will show the profit earned after deducting the discount from the cost price. Also, using the Format functionality provided, one can add different symbols to the columns like here I have added the currency symbol to the sales, cost, discount, and gross profit columns.
Create and manage relationships between tables and view them in the model tab. Here, In the below snapshot, I have created one-to-one relationships for the sales_details table with customer_details and order_details table.
One can easily manage and create relationships between tables in Power BI, just as shown below. I have created 5 such relationships.
To generate the model, open the model tab and observe the tables and relationships between those tables. The below snapshot shows the model generated.
Let’s start by creating KPI virtualizations for Gross profit by Category and Sales by Category. For creating this visualization, I chose Category from product_details table and sales from the sales_details table.
Another visualization of a Donut Chart that shows the representation of Gross Profit by Category.
In this case, I have generated a chart that will compare Gross Profit and Sales by category. For the axis, I have selected Category from the product_details table, and for values, Gross Profit and Sales.
Next, I have created a visualization using the Pie Chart which shows the Gross profit with respect to different sub-categories.
Lastly, created this visualization in tabular form which shows details about the category, sub-category, product name, cost, discount, sales, and gross profit.
In the below snapshot, the complete report created can be seen, it includes the KPI graphs along with the Pie chart, comparison between Gross Profit and Sales by category, and data in tabular form.
As the reports generated in Power BI are interactive, when we select a particular sub-category in the Pie Chart here “Art” the other visualizations will highlight and show the values corresponding to only the “Art” category.
That’s all for this blog.