Analyzing Sales Insights: Data analysis project with SQL and Power BI

Syed Izhan Ali
4 min readJan 3, 2024

--

You can view this report at https://app.powerbi.com/links/K5oK4MlHa-?ctid=7f8b5cad-1705-4711-b709-fe12a2cae94b&pbi_source=linkShare if you have a working email.

Why create this project?

I started a project where I examined real data from a hardware company facing tough times because their costs were going up. They needed help figuring out what to do.

When I found this data online, I thought using Power BI to make a dashboard could help solve the company’s problems. But it wasn’t just about making a dashboard; it was a big project. I collected the data, looked at it carefully to understand it better, cleaned it up to make it right, and then built the dashboard. The goal was to solve important problems the company was facing in the business world.

Data overview

The data I worked with came from a company and was split into 5 parts or tables. These tables were about:

  1. Sales Customer: Information about the customers who bought things.
  2. Sales Date: Details related to when the sales happened.
  3. Sales Markets: Insights into the different markets where the company sold its products.
  4. Sales Products: Details about the products the company sells.
  5. Sales Transactions: Records of all the transactions that took place.

Data collection

I didn’t personally gather or scrape this data; instead, I found and downloaded it online. Sometimes, datasets are readily available, and in this case, it was an SQL file. I imported this file into a MySQL server using MySQL Server Workbench.

While collecting data firsthand can be a good practice, when a dataset is easily accessible and readily available, leveraging it directly can save time and effort. In this scenario, obtaining the dataset online allowed me to swiftly move forward with the analysis.

Exploratory Data Analysis

I used SQL for exploring the data, and in my opinion, it’s an amazing tool for a data analyst. While going through the data, I noticed several mistakes that needed fixing. For instance, in the ‘currency’ column within the ‘sales transactions’ table, it appeared to have only two currencies, USD and INR. However, upon closer examination using filtering methods, I discovered the duplicates of both of the currencies.

There were duplicate entries for each of the currencies, which seemed almost identical to one another. However, digging deeper into the data revealed that these duplicates had significantly fewer values compared to the second duplicate currency had more values. So, I sorted the rows for only showing one of the two duplicate currencies. This was an excellent example of how data analysis helped identify and resolve a major issue in the dataset.

Data Cleaning

In data analysis, using SQL for data cleaning is a fantastic option. With just a few simple queries, millions of rows of data can be cleaned efficiently. However, if the dataset isn’t extensive or you prefer not to keep it in a database server, Excel is a great choice. I find Excel to be the easiest and best tool for data cleaning.

For this project, I utilized Power Query within Power BI to transform and clean the data. It’s quite similar to Excel but functions as a handy shortcut specifically designed for Power BI.

Building Dashboard

Initially, I calculated the total revenue and total sales quantity. Then, I created a bar graph that showcased the top 10 customers alongside their respective sales. Similarly, another bar graph displayed the sales quantities for these top 10 customers.

Moving on, I crafted another set of bar graphs highlighting the top 10 markets and their sales, followed by another bar graph showing sales quantities for these markets. Additionally, I designed a line graph to depict the revenue trends over the years.

The most pivotal aspect of the dashboard was the implementation of a slicer graph. This feature allowed for effortless data exploration by enabling users to filter data for specific years or even months. Users could simply select the desired year or month using the provided buttons, enabling a focused view of the data.

Conclusion

This meticulously crafted dashboard serves as an invaluable asset for any company striving to comprehend and monitor its expenses effectively over time. By encapsulating crucial data insights within a user-friendly interface, this dashboard facilitates a comprehensive understanding of sales trends, revenue patterns, and customer behaviors.

The ability to effortlessly visualize and analyze top customers, markets, and revenue trends over the years, and perform real-time data filtering via the slicer graph empowers decision-makers to gain actionable insights promptly. Such insights play a pivotal role in strategizing, optimizing expenses, identifying lucrative markets, and enhancing overall business performance.

Tips for Data Analysts:

  1. Embrace Diverse Tools: Explore various tools like SQL, Excel, and specialized software like Power BI for versatile data analysis and visualization.
  2. Thorough Data Exploration: Delve deep into the data for hidden patterns, anomalies, and discrepancies; they often hold critical insights.
  3. User-Friendly Dashboards: Design dashboards that are intuitive, easy to navigate, and provide actionable insights swiftly.
  4. Continuous Learning: Keep abreast of new technologies, methodologies, and trends within the data analysis domain to continually enhance skills.

For further, you can contact me

Email: eyemaster766@gmail.com

Linkedin: www.linkedin.com/in/syed-izhan-ali-5b1257286/

Instagram: https://www.instagram.com/datascience.odyssey/

Thank you so much for reading till the end!

--

--