Customer Count
Facts defining customer counts at a given date and value type, used as the baseline for customer evolution.
Facts
Definitions
| Column | Description |
|---|---|
| date | Date in YYYY-MM-DD format, reference to Dates. |
| value_type_id | Type of value measured (links to Value Types, e.g., actuals, budget). |
| net_new | Net new customers calculated as new customers minus churn, per date and value type. |
| cum_net_new | Cumulative sum of net_new. |
| current_base | Nr of customers balance at the beginning of the period. |
| ending_balance | Nr of customers balance at the end of the period. |
Sample & Implementation
| date | value_type_id | net_new | cum_net_new | current_base | ending_balance |
|---|---|---|---|---|---|
| 2025-01-01 | 2 | 35 | 35 | 3000 | 3035 |
| 2025-02-01 | 2 | 47 | 82 | 3035 | 3082 |
| 2025-03-01 | 2 | 47 | 129 | 3082 | 3129 |
| 2025-04-01 | 2 | 47 | 176 | 3129 | 3176 |
| 2025-05-01 | 2 | 47 | 223 | 3176 | 3223 |
| 2025-06-01 | 2 | 47 | 270 | 3223 | 3270 |
| 2025-07-01 | 2 | 46 | 316 | 3270 | 3316 |
| 2025-08-01 | 2 | 46 | 362 | 3316 | 3362 |
| 2025-09-01 | 2 | 46 | 408 | 3362 | 3408 |
| 2025-10-01 | 2 | 46 | 454 | 3408 | 3454 |
Data Format
Field
Type
The primary key is formed by constrainst on dates and value types:
PRIMARY KEY (date, value_type)