Sales Dashboard with SQL and PowerBI

Segun Oni

Data Visualizer
Data Analyst
Writer
Microsoft Power BI
PostgreSQL
Python
RemotePass
This project involves analyzing sales data provided by a start-up that sells various products through multiple channels. The goal is to create a dashboard that provides insights on a weekly basis to inform strategy. The analysis focuses on identifying key trends, patterns, and potential areas for improvement. Additionally, the project aims to identify gaps and additional data to track for making meaningful decisions at the executive level.
Data Sources
The project uses the following tables:
Accounts:  account, sector, year_established, revenue, employees, office_location, subsidiary_of
Sales_Teams: sales_agent, manager, regional_office
Products: product, series, sales_price
Sales_Pipeline: opportunity_id, sales_agent, product, account, deal_stage, engage_date, close_date, close_value
Objectives
Overall Performance Analysis:
Calculate total sales revenue over time.
Analyze the distribution of deal stages to understand the sales pipeline's health.
Calculate win rates for different products, sales agents, and accounts.
Identify the most successful sales agents and accounts based on closed deals.
2. Sales Performance Analysis:
Calculate total sales revenue over time.
Determine the average sales cycle length.
Measure revenue generated by each product.
Track revenue by region.
3. Product Performance Analysis
Evaluate the performance of each product in terms of revenue generated and number of deals closed.
Analyze the distribution of deal stages for each product to identify bottlenecks.
Identify cross-selling opportunities by analyzing which products are often sold together.
4. Sales Team Analysis:
Assess the performance of sales agents in terms of revenue generated and deals closed.
Analyze the distribution of deal stages for each sales agent to identify areas for improvement.
Identify top-performing sales agents and provide insights into their successful strategies.
5. Account Analysis:
Segment accounts based on industry, size, and location to identify high-value segments.
Analyze the distribution of deal stages for each account segment to understand conversion rates.
Identify key accounts with high potential for upselling or cross-selling.
6. Trend Analysis
Analyze sales performance over time to identify seasonal trends or fluctuations.
Identify any sudden changes or anomalies in sales data that may require further investigation.
7. Additional Data Requirements
Track customer demographics, marketing campaigns, customer feedback, and competitor activities to enhance analysis and strategic decision-making.
SQL Queries
Product Performance per Quarter
SELECT product,
QUARTER(close_date) AS quarter,
COUNT(*) AS number_of_deals
FROM Sales_Pipeline
WHERE deal_stage = 'Won'
GROUP BY product, QUARTER(close_date)
ORDER BY product, quarter;
Revenue per Product
SELECT product,
SUM(close_value) AS total_revenue
FROM Sales_Pipeline
WHERE deal_stage = 'Won'
GROUP BY product
ORDER BY total_revenue DESC;
Regional Revenue per Product
SELECT p.product,
st.regional_office,
SUM(sp.close_value) AS total_revenue
FROM Sales_Pipeline sp
JOIN Sales_Teams st ON sp.sales_agent = st.sales_agent
JOIN Products p ON sp.product = p.product
WHERE sp.deal_stage = 'Won'
GROUP BY p.product, st.regional_office
ORDER BY p.product, total_revenue DESC;
Some DAX Measures
Number of Deals Closed
NumberOfDealsClosed =
CALCULATE(
COUNT(Sales_Pipeline[opportunity_id]),
Sales_Pipeline[deal_stage] = "Won"
)
Top 10 Performing Agents
Top10Agents =
TOPN(
10,
SUMMARIZE(
Sales_Pipeline,
Sales_Pipeline[sales_agent],
"TotalRevenue", SUM(Sales_Pipeline[close_value])
),
[TotalRevenue], DESC
)
Difference Between Engage Date and Close Date
EngageToCloseDuration =
DATEDIFF(Sales_Pipeline[engage_date], Sales_Pipeline[close_date], DAY)
Percentage Lost
PercentageLost =
DIVIDE(
CALCULATE(
COUNT(Sales_Pipeline[opportunity_id]),
Sales_Pipeline[deal_stage] = "Lost"
),
COUNT(Sales_Pipeline[opportunity_id])
) * 100
Implementation Notes
Ensure that all necessary data preprocessing steps are performed in Power Query before loading the data into Power BI.
Use the DAX measures to create visuals in Power BI that reflect the key performance indicators and insights identified in the objectives.
For detailed analysis and cross-selling opportunities, consider creating additional calculated columns and tables in Power Query.
Conclusion
This project aims to provide a comprehensive analysis of the sales data to derive meaningful insights that can drive strategic decision-making at the executive level. The use of SQL and DAX enables efficient data processing and visualization, facilitating informed decisions based on accurate data insights.
Partner With Segun
View Services

More Projects by Segun