3540_PFT_BAS_daily_plan Transformation

Target Database Table

drp.daily_plan.

Script Description and Logic

Constructs a daily plan shop level table using BSD planned revenue data as well as calendar date, in order that planned revenue can be compared with realized revenue.

Source Tables Used In Script

Schema Table (or Derived Table) Name Table Type Purpose
drp performance_trend_benchmarks database Primary
N/A CTE1 derived Lookup

SQL Flow

To View Larger Image, Right Click and Choose Open Image In New Tab.

 3540_PFT_BAS_daily_plan Transformation
Calculated and Derived Fields

Target Column Target Column Data Type Source schema.table Source Column Transformation/Logic
spv_forecast DECIMAL(20,4) drp.performance_trend_benchmarks sales_per_visit (.133333*sales_per_visit)+((1-.13333)*sales_per_visit_b)
conv_forecast DECIMAL(20,4) drp.performance_trend_benchmarks conversion (.133333*conversion)+((1-.13333)*conversion_b)
aov_forecast DECIMAL(20,4) drp.performance_trend_benchmarks aov (.133333*aov)+((1-.13333)*aov_b)
upo_forecast DECIMAL(20,4) drp.performance_trend_benchmarks upo (.133333*upo)+((1-.13333)*upo_b)


All content © Daasity 2021. Do not copy, share or distribute.