From the "Data Tutorials" YouTube channel I followed along with a dashboard creation for Pizza Sales analysis, showing insights into Total Revenue, Best Sellers, Worst Sellers and a whole lot of others.
I first learnt how to run the queries in SQL to be used later to validate the outputs of the dashboard. I then used the SQL upload feature of Power BI, cleaned up the data and created the dash board.
Here you can see the finished product. Here's a little about each page:
Page 1: Sales Performance Snapshot
Total revenue, average order value, total pizzas sold, total orders, and pizzas per order
Peak order periods by day of week and by hour, highlighting Fridays, Saturdays, and summer months
Daily trend line showing weekday order volumes (Fridays peak at 3,500 orders)
Monthly trend chart with July (1,935 orders) and January (1845 orders) as top months
Category breakdown (Classic, Supreme, Veggie, Chicken) and size share (Large 46 %)
Page 2: Menu Item Leaderboards
Front-and-center KPIs: total revenue, total orders, total volume
Top 5 pizzas by revenue, quantity, and order count
Under-performers flagged for menu optimisation
Interactive filters for flavor profiles and size
Scroll down to explore the end-to-end process - how I sourced the data, applied transformations, built DAX measures, and refined the layout for maximum impact
I first created a new database in Microsoft SQL Server Management Studio and imported the .csv file containing all pizza sales for the year 2015.
The first query ran was SELECT * FROM pizza_sales; to view all features of the table.
Next I ran SQL queries based on items required from the brief, recorded them and the output in a word file to validate the dashboard later. Key components of the brief were:
A. KPI’s:
1. Total Revenue:
2. Average Order Value
3. Total Pizzas Sold
4. Total Orders
5. Average Pizzas Per Order
B. Daily Trend for Total Orders
C. Monthly Trend for Orders
D. % of Sales by Pizza Category
E. % of Sales by Pizza Size
F. Total Pizzas Sold by Pizza Category
G. Top 5 Pizzas by Revenue
H. Bottom 5 Pizzas by Revenue
I. Top 5 Pizzas by Quantity
J. Bottom 5 Pizzas by Quantity
K. Top 5 Pizzas by Total Orders
L. Bottom 5 Pizzas by Total Orders
SQL Query example:
I then opened Power BI and used the "Get Data" function and selected from "SQL Server" I entered my server details and was able to load the data into Power BI.
Next I needed to clean some of the values such as Pizza_Size, values in here were abbreviated such as "XL" for "X-Large" where I wanted to use the full name, so I used Find replace to change these. I also added columns to get the Day and Month names out of the date so I could build outputs for days and months
Next I created five DAX queries to be used for the KPI cards. This queries will also be used as part of some ot he the visuals.