Data Model
Understanding the RevIQ data model is essential for working with forecasts and performance analytics.
Data Flow Overview
Data typically flows from raw data sources through transformation layers to the tables used by the front end in Una.
Core Stored Procedures
App_GeneratePeriodDim
Populates the Period dimension table.
Parameters:
@fromYear INT@toYear INT
Action: Truncates and populates Years, Quarters, and Months into the Dim_PC_Period table over the range of parameters.
Appg_UpdateModel_Main
Updates the model with actual data.
Actions:
- Calculate averages for Amount KPIs to replace missing values in
T_Mainwhere all Amount KPIs are missing; load averages intoS_Mainfor reference - Delete and populate recent data (> StartDate from DataProcessingParameters) in
VCohort_MainfromT_Main - Delete and populate Actuals in
B_MainfromT_Main - Delete and populate
C_Mainwith diagnostic cohort KPIs fromVCohort_Mainand expansion cohorts fromT_Main - Delete and populate recent
CB_MainfromT_Main - Delete and populate recent actuals in
M_MainfromCB_Main
Appg_GenerateStatistics_Main
Generates statistics for forecasting.
Source: Takes Actuals from B_Main and T_Main
Output: Statistics (conversion percentages and other trends) stored in S_Main under Actuals Scenario.
Additional actions:
- Updates
p_StartPeriodandp_EndPeriodinDim_PC_Scenariofor this scenario
Process:
- Creates statistics based on historical data, primarily conversion percentages
- Works sequentially with widening scope of segments (more general grouping) to have more robust stats
- Calculates average DaysInStage (by progress/lost/regress) and average deal size
Appg_GenerateForecast_Main
Generates forecasts based on statistics.
Parameters:
@forecastScenario INT
Process:
- Takes stats from
S_Mainunder the given Scenario - Takes latest Actuals from
B_Main - Applies conversion percentages sequentially 12 times (for 12 forecast periods)
- Stores forecast in
B_Mainunder the given ScenarioId - Loads
M_Mainwith forecasted KPIs (except Days), including NRR and GRR
The scenario for this stored procedure can be any except Actuals—validation has been added to enforce this.