Sales Forecasting & Model Performance

Sales-forecasting-model-performance-insights

On this page

Introduction

The Sales Forecasting & Model Performance Dashboard provides an integrated analytical framework for exploring sales performance, business drivers, and machine learning forecasting accuracy within a unified business intelligence environment. Developed using the Dashtera no-code analytics platform, the dashboard allows analysts, business managers, and data scientists to investigate historical sales patterns, evaluate the influence of pricing and marketing strategies, and compare predictive model performance through interactive visual analytics. 

Modern retail and e-commerce environments generate large volumes of transactional data containing information about products, regions, pricing strategies, promotional discounts, and marketing investments. Understanding how these variables influence product demand and revenue generation is essential for improving strategic decision-making and forecasting future sales trends. 

The dashboard uses PostgreSQL as the central data management system, allowing Dashtera to execute structured SQL queries directly on the dataset and transform aggregated results into visual analytics components. Across three analytical pages, the dashboard integrates sales performance indicators, revenue drivers, and machine learning model evaluation metrics. 

This project demonstrates how business intelligence dashboards can combine traditional sales analytics with machine learning model evaluation, enabling organizations to gain both operational insights and predictive forecasting capabilities within a single analytical platform. 

Background and Data Source

The dataset used for this project represents simulated retail sales transactions across multiple product categories, geographical regions, and time periods. The data captures key variables that influence product demand and revenue generation, allowing the dataset to support both business intelligence analysis and predictive modeling tasks.

Sales forecasting plays a critical role in business operations. Accurate forecasts help organizations optimize inventory management, allocate marketing budgets efficiently, and improve pricing strategies. By combining transactional data with machine learning models, organizations can better understand future demand patterns and identify the most influential factors affecting sales outcomes.

The dataset contains daily sales observations spanning three years (2022–2024) and includes product categories such as Headphones, Laptops, Monitors, Phones, and Tablets. Each record includes pricing information, discount rates, marketing expenditure, units sold, and the resulting revenue generated from the transaction.

The dataset supports multiple analytical objectives, including:

  • Sales performance monitoring
  • Revenue distribution analysis across products and regions
  • Evaluation of pricing and promotional strategies
  • Marketing effectiveness analysis
  • Machine learning-based sales forecasting
  • Business intelligence dashboard development for retail analytics 

Dataset Description

The dataset captures the relationships between product characteristics, pricing strategies, marketing investments, and resulting sales performance. Each observation includes time-based variables such as date, year, month, and day of the week, enabling time-series analysis and seasonal trend identification.

Product-related attributes include the product category and the geographical sales region, which allow analysts to evaluate demand differences across market segments. Pricing information includes the base product price and the applied discount percentage, both of which influence consumer purchasing behavior.

Marketing investment is represented through the marketing spend variable, which reflects promotional activities designed to increase product visibility and stimulate demand. The dataset also records the number of units sold for each product along with the resulting revenue, providing a direct link between sales performance and the associated business drivers.

In addition to these original variables, the dataset incorporates machine learning prediction outputs generated directly within the Dashtera platform. Dashtera includes built-in machine learning capabilities that support both regression and classification models, enabling predictive analysis to be performed directly within the dashboard environment without external model development.

For this project, several regression-based forecasting models available in Dashtera were applied to predict future unit sales. The models used include:

  • Linear Regression
  • Random Forest Regressor
  • LightGBM Regressor
  • XGBoost Regressor

Each model produces predicted values for units sold, which are stored alongside the original dataset variables. Dashtera also computes residual values, representing the difference between predicted and actual unit sales. These residuals allow analysts to evaluate model performance and assess forecasting accuracy.

By integrating machine learning predictions directly within the dataset, the dashboard supports model comparison analysis, enabling users to visually evaluate how different algorithms perform when forecasting product demand. This approach demonstrates how modern business intelligence platforms can combine traditional data analytics with built-in machine learning capabilities to support predictive decision-making.

Dashtera

Dashtera is a modern cloud-based no-code business intelligence platform designed to transform raw datasets into interactive dashboards and analytical applications without requiring complex programming. 

The platform integrates directly with PostgreSQL databases, allowing analysts to execute SQL queries and instantly visualize aggregated results using a wide variety of analytical charts and visualization techniques. 

Key Features 

  • Wide variety of visualization types, including line charts, spider charts, Pareto charts, histograms, box plots, and heatmaps
  • Interactive filtering and dynamic drill-down capabilities
  • Direct SQL-based data querying for real-time analytics
  • Support for machine learning model comparison visualizations 

Advantages 

  • Rapid development of analytical dashboards without extensive coding 
  • Efficient transformation of raw business data into visual insights 
  • Flexible environment for both operational and predictive analytics 
  • Suitable for business intelligence, data science, and decision-support systems 

Dashboard Analysis

The Sales Forecasting & Model Performance Dashboard is organized into three analytical pages, each focusing on a specific dimension of the dataset. Together, these pages provide a comprehensive exploration of historical sales performance, the factors driving revenue generation, and the effectiveness of machine learning forecasting models.

Sales Performance Overview

The first dashboard page provides a comprehensive overview of the overall sales performance across the entire dataset. Key performance indicators reveal that total revenue generated during the observed period is approximately $6.46 billion, while the total number of units sold exceeds 7.04 million units. 

Sales-forecasting-model-performance-overview

The average product price across all transactions is approximately $1,153.37, with an average discount level of 14.98%. Total marketing expenditure during the period reaches approximately $120.53 million, providing context for evaluating marketing effectiveness relative to revenue generation.

Monthly revenue trend analysis highlights consistent seasonal patterns across the three observed years. Revenue tends to increase significantly during the final quarter of the year, particularly in November and December, suggesting the influence of holiday shopping seasons and promotional campaigns.

Product-level analysis reveals that phones represent the largest revenue contributor, followed by laptops and monitors. Revenue distribution across regions shows that the East and North regions generate the highest sales volumes, indicating stronger market demand in these geographic areas.

Further visualizations provide additional insights into product performance. Bar charts illustrating the average number of units sold per day show that phones maintain the highest daily demand among all product categories. Additional charts analyzing average price and discount rates across products indicate relatively consistent pricing strategies across the product portfolio.

Distribution-based visualizations further highlight the characteristics of the dataset. Price histograms demonstrate a relatively uniform price distribution across products, while box plots reveal moderate variation in revenue levels between product categories.

Together, these visualizations provide a comprehensive overview of sales activity, product demand patterns, and regional revenue distribution across the dataset.

Sales Drivers & Business Insights

The second dashboard page focuses on identifying the primary drivers influencing sales performance and revenue generation. 

Sales-forecasting-model-performance-insights

Revenue breakdown analysis reveals that phones consistently generate the highest revenue across most months, followed by laptops and monitors. Seasonal revenue fluctuations across product categories indicate increased consumer demand during mid-year and year-end periods.

Regression analyses on this page examine the relationships between pricing strategies, promotional activities, and product demand. A regression analysis of price versus units sold for phones reveals a negative trend, indicating that higher prices are generally associated with lower sales volumes. However, the relatively modest coefficient of determination suggests that price alone explains only part of the variation in demand.

Discount analysis demonstrates a positive relationship between discount levels and units sold, suggesting that promotional pricing strategies can stimulate consumer purchases. Similarly, marketing expenditure shows a positive relationship with revenue generation, though the strength of this relationship is relatively moderate.

Several performance gauges provide additional insights into business efficiency. The average discount utilization is approximately 14.98%, while marketing efficiency indicates that each marketing dollar generates approximately $53.58 in revenue. Additionally, marketing campaigns generating one million dollars of investment produce approximately 58,440 units of product sales, providing a measure of promotional effectiveness.

A funnel analysis illustrates the transformation of gross sales into net revenue. After accounting for discounts and marketing costs, the final net revenue reaches approximately $6.46 billion, demonstrating the overall financial impact of pricing and promotional strategies.

Distribution visualizations further reveal that revenue values follow an approximately normal distribution, while marketing spend values exhibit a more uniform distribution across transactions.

These analyses collectively highlight how pricing decisions, marketing investments, and promotional strategies influence overall sales performance.

Machine Learning Forecast & Model Comparison

The third dashboard page focuses on evaluating the performance of machine learning models used to forecast future product demand. Unlike the previous dashboard pages that analyse historical sales behaviour and business drivers, this page introduces predictive analytics by comparing the accuracy of multiple regression-based forecasting models. 

Sales-forecasting-model-performance-comparison

Machine learning predictions were generated directly within the Dashtera platform using its built-in predictive modelling capabilities. Dashtera supports a range of regression and classification algorithms that can be applied directly to connected datasets, allowing predictive analysis to be performed without external machine learning frameworks. 

For this project, four regression models available within Dashtera were applied to predict the number of units sold based on the dataset’s key variables, including product type, region, price, discount levels, and marketing expenditure. The models evaluated include: 

  • Linear Regression
  • Random Forest Regressor
  • LightGBM Regressor
  • XGBoost Regressor 

Regression comparison charts visualize the relationship between actual units sold and the predicted values generated by each model. Ideally, accurate models should produce predicted values that closely follow the diagonal line representing perfect prediction. The ensemble-based models demonstrate tighter clustering around this ideal line, indicating stronger predictive performance compared to the linear regression model. 

Residual distribution analysis provides additional insight into model accuracy. Residuals represent the difference between predicted and actual unit sales values. Histogram and distribution charts reveal that the residual values produced by ensemble models are generally smaller and more tightly distributed around zero, while the residuals produced by the linear regression model show greater variability. 

A spider chart comparing average predicted values across models illustrates that all models produce predictions close to the dataset’s average unit sales value of approximately 321 units per observation. However, subtle differences between the models become clearer when analysing prediction differences and error metrics. 

Model error comparison charts highlight the differences in forecasting accuracy across algorithms. The Linear Regression model exhibits the highest average prediction error, indicating that simple linear relationships may not fully capture the complex interactions between pricing, promotions, marketing investment, and sales demand. In contrast, ensemble learning models provide significantly improved accuracy. 

Among the evaluated models, XGBoost produces the lowest prediction error, followed closely by LightGBM, while Random Forest also performs substantially better than the linear regression model. These results align with widely observed patterns in predictive modelling, where gradient boosting and ensemble methods often outperform simple regression models when handling nonlinear relationships and interactions between multiple variables. 

Additional line charts comparing actual unit sales with predicted values over time further illustrate how closely each model tracks real sales patterns. These visualizations allow analysts to evaluate whether the models capture seasonal trends and fluctuations in product demand. 

By integrating machine learning forecasting directly into the business intelligence dashboard, this page demonstrates how predictive analytics can complement traditional sales analysis. The ability to visually compare model predictions and errors allows analysts to identify the most reliable forecasting approach while maintaining full transparency into model performance. 

Forecast 2025

The fourth dashboard page extends the analytical framework into forward-looking predictive analytics, presenting a comprehensive forecast of sales performance for the year 2025. Unlike previous pages that analyze historical data and model performance, this section focuses on anticipated future trends, enabling proactive decision-making and strategic planning. 

Sales-forecasting-model-performance-forecast

Since actual sales values for 2025 are not available, this page relies entirely on machine learning model predictions, particularly leveraging the XGBoost model due to its superior accuracy observed in earlier evaluation metrics. Predicted values for units sold are combined with pricing and discount structures to estimate future revenue, allowing the dashboard to simulate realistic business scenarios. 

At a high level, the forecast indicates that overall sales performance in 2025 follows patterns consistent with historical trends observed between 2022 and 2024. Seasonal variations remain evident, with increased sales volumes during mid-year promotional periods and peak performance during year-end months, reflecting holiday-driven demand cycles. This consistency suggests that the models have successfully captured underlying temporal patterns in the dataset. 

Monthly trend visualizations reveal that predicted units sold gradually increase during the first half of the year, followed by noticeable peaks in June and July. A temporary stabilization occurs during late summer months, after which demand rises again significantly in November and December. These seasonal fluctuations align with typical retail cycles, indicating strong model generalization. 

Product-level analysis highlights differences in expected demand across categories. Phones continue to dominate predicted sales volumes, maintaining their position as the highest-performing product segment. Laptops and monitors also demonstrate strong projected demand, while tablets and headphones show relatively moderate but stable growth patterns. These variations reflect both product popularity and sensitivity to pricing and promotional strategies. 

Regional analysis further reveals disparities in forecasted performance, with certain regions consistently generating higher predicted sales volumes. This suggests that geographical demand patterns identified in historical data persist into future projections, reinforcing the importance of region-specific marketing and distribution strategies. 

Advanced visualizations such as 3D scatter plots provide deeper insights into the relationships between pricing, marketing investment, and predicted sales. These plots illustrate that higher marketing spend generally correlates with increased predicted units sold, while higher prices tend to moderate demand. The interaction between these variables demonstrates the trade-offs businesses must consider when optimizing revenue and sales volume. 

Distribution-based visualizations, including histograms and box plots, indicate that predicted sales values maintain a stable and approximately normal distribution, suggesting that the forecasting models produce consistent and reliable outputs without extreme volatility. This stability is essential for business planning, as it reduces uncertainty in decision-making. 

Additionally, model comparison visualizations on this page reinforce confidence in the forecasting approach. While all models produce similar prediction ranges, XGBoost consistently provides slightly more refined estimates, further justifying its use as the primary forecasting model for 2025 projections. 

Overall, the Forecast 2025 dashboard page transforms the system from a descriptive and diagnostic analytics tool into a predictive decision-support platform. By combining historical patterns with advanced machine learning predictions, this page enables stakeholders to anticipate future sales behavior, optimize pricing and marketing strategies, and make informed business decisions with greater confidence. 

Dashtera Integration with PostgreSQL

The architecture of the dashboard relies on PostgreSQL as the central data management and analytical processing system. All raw transactional data, derived sales metrics, and machine learning prediction outputs are stored within the PostgreSQL database. 

Dashtera connects directly to the database and executes SQL queries to retrieve aggregated results for visualization. This architecture allows real-time analysis without requiring manual data preprocessing or external data transformation workflows. 

Using PostgreSQL provides several advantages for dashboard development, including scalable storage, support for complex analytical queries, and efficient integration with business intelligence platforms. This approach ensures that analytical results remain consistent, reproducible, and easily maintainable as the dataset evolves. 

Discussion

The Sales Forecasting & Model Performance Dashboard demonstrates how business intelligence platforms can effectively integrate traditional sales analytics with machine learning and forecasting techniques. The first dashboard page provides a comprehensive overview of sales performance, including product demand patterns, seasonal trends, and regional revenue distribution. The second page focuses on key business drivers, showing how pricing strategies, discounts, and marketing investments influence customer purchasing behaviour. 

The third page extends the analysis through machine learning model evaluation, comparing Linear Regression, Random Forest, LightGBM, and XGBoost models. The results highlight the advantage of advanced ensemble methods in capturing complex relationships within the data and improving prediction accuracy. 

The fourth page introduces a 2025 sales forecast, shifting the dashboard from historical analysis to predictive insights. The forecast preserves seasonal patterns observed in previous years and reinforces consistent demand trends across products and regions. This integration of forecasting enhances the dashboard’s ability to support strategic planning and decision-making. 

Conclusion

The Sales Forecasting & Model Performance Dashboard illustrates how Dashtera and PostgreSQL can be used to transform raw sales data into a comprehensive analytical platform that supports descriptive, diagnostic, and predictive analytics. 

By combining sales performance analysis, business driver insights, machine learning evaluation, and future forecasting within a structured four-page dashboard, the project provides a complete view of retail performance. The addition of the 2025 forecast further enhances its practical value by enabling forward-looking insights and data-driven planning. 

Overall, the project highlights the importance of integrating machine learning into business intelligence dashboards, allowing organizations to move beyond historical reporting toward proactive and strategic decision-making. 

Share:

Read More

Want to see your data come to life?

Begin building your dashboards now, and unleash your creativity!

Dashtera Logo
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.