https://store-images.s-microsoft.com/image/apps.31703.ce7443e5-499b-4dab-a721-53371e529bc5.4da260ec-10aa-4af2-8059-493a1f98f776.91a8b8b5-72a2-42f1-ae35-a43d94f0782c
demand_planning_by_office _solution
by Office Solution
Demand planning forecasts future demand to optimize inventory, minimizing stockouts and overstocking
Demand Planning: Forecasting and Stock Risk Calculation
Objective
This script is a part of a demand planning tool, designed to forecast sales based on historical data, sales adjustments, and various user inputs. It calculates sales projections and assesses potential stock risks by forecasting sales for different periods (e.g., quarterly, monthly, etc.), factoring in growth rates and inventory levels.
Key Elements of the Forecasting Logic
User Inputs
The function takes several parameters from the user interface (UI), such as dropdown menus, sliders, and input fields:
- Period Selection (dropdownContainer4): User selects the period for forecasting (e.g., Quarterly, Monthly, Weekly, Daily).
- Forecast Count (forecastCountInput): User specifies how many forecasting periods they want to project.
- Growth Adjustment (sliderContainer): User adjusts a percentage to increase or decrease sales projections based on current performance.
- Sales Data: Different dropdowns allow users to select:
- Category Sales
- Previous Sales
- Current Sales
- Inventory Levels
Sales Calculation
The core of the function is the calculation of future sales based on the following logic:
- Adjusted Sales: Current sales are adjusted by a user-defined percentage (adjustmentPercentage).
- Growth Rate: The growth rate is calculated based on the difference between previous and current sales. If there is no previous sales data, the growth rate is set to zero.
- Period-Specific Sales: Based on the selected period (Quarterly, Monthly, etc.), the function divides the total sales for the next year into the appropriate number of periods:
- Quarterly: Sales divided by 4
- Monthly: Sales divided by 12
- Weekly: Sales divided by 52
- Daily: Sales divided by 365
Forecast Calculation
- Forecast for Each Period: The function then forecasts sales for each selected period (e.g., Q1, Q2, etc.), applying the growth rate for each step. The forecast is generated by multiplying the previous period's forecast by the growth rate.
Stock Risk Calculation
- Risk Assessment: Stock risk is calculated by comparing forecasted sales to the available inventory. For each forecasted period, it determines how much of the inventory will be used. If forecasted sales exceed available inventory, it calculates the percentage risk.
- Inventory Update: The inventory is reduced by the forecasted sales for each period, providing an updated inventory level for future forecasting periods.
Output: Forecast Table
The function then generates a table using the renderTable function. This table displays:
- Forecasted sales for each period
- Stock risk (as a percentage of inventory)
- Adjusted sales, growth rate, and the difference between current and previous sales
Detailed Breakdown of Returned Data
- Category Sales: The specific sales data for the selected category.
- Previous Sales: Sales data from the previous period.
- Current Sales: Current sales data for the selected period.
- Inventory Level: Remaining inventory after accounting for the forecasted sales.
- Updated Sales: Sales projections after adjustment.
- Growth Rate: The percentage change in sales based on previous and current sales.
- Forecast Values: Projected sales for each forecast period (quarter, month, week, day).
- Stock Risk: The calculated risk of stock shortages based on the forecasted sales and current inventory levels.
- Forecast Percentage: The growth rate as a percentage for each forecast period.
- Difference: The difference between current and previous sales, helping to identify how the forecasted sales deviate from past performance.
Key Concepts in Demand Planning
- Sales Forecasting: The process of predicting futur
Visual capabilities
When this visual is used, it
- Can access external services or resources
At a glance
https://store-images.s-microsoft.com/image/apps.31359.ce7443e5-499b-4dab-a721-53371e529bc5.4da260ec-10aa-4af2-8059-493a1f98f776.0ae8a06b-8ac4-497a-82f7-30f56c1ba741
https://store-images.s-microsoft.com/image/apps.30684.ce7443e5-499b-4dab-a721-53371e529bc5.4da260ec-10aa-4af2-8059-493a1f98f776.be8531a9-c3c4-4119-bc28-6cef023ba44e
https://store-images.s-microsoft.com/image/apps.1884.ce7443e5-499b-4dab-a721-53371e529bc5.4da260ec-10aa-4af2-8059-493a1f98f776.7d38d9d4-9d32-4eca-9a85-8daa64c713e7
https://store-images.s-microsoft.com/image/apps.46826.ce7443e5-499b-4dab-a721-53371e529bc5.4da260ec-10aa-4af2-8059-493a1f98f776.d1d6e844-ccef-4f10-9238-0b8b4385fd37
https://store-images.s-microsoft.com/image/apps.32335.ce7443e5-499b-4dab-a721-53371e529bc5.4da260ec-10aa-4af2-8059-493a1f98f776.e256d033-2f10-4b8e-b490-acce33307e99
Other apps from Office Solution
Bar Chart With Top N SelectionOffice SolutionSelect Top N number of items to be displayed in chart and rest items will be clubbed as others
+1
Applicable to:
Power BI visuals
NaN out of 5
Custom SlicerOffice SolutionCustom slicer for power bi visuals
+1
Applicable to:
Power BI visuals
NaN out of 5
Stacked Bar Chart With Top NOffice SolutionStacked bar chart with feature of selected top n number of values to filter out others
+1
Applicable to:
Power BI visuals
NaN out of 5
Calendar Chart For Power BIOffice SolutionA Calendar Chart is a type of data visualization that represents data points over a calendar year.
+1
Applicable to:
Power BI visuals
NaN out of 5
Custom tree view with bar chartOffice SolutionChart with the combination of Bar and Tree map in which width and height of column can be managed
+1
Applicable to:
Power BI visuals
NaN out of 5