-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstripe__metrics.yml
150 lines (142 loc) · 4.41 KB
/
stripe__metrics.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
version: 2
sources: []
models: []
metrics:
- name: stripe__monthly_platform_fees
label: Monthly Stripe Platform Fees
model: ref('stripe__main_transactions')
description: "Monthly fees paid to Stripe."
calculation_method: sum
expression: balance_transaction_amount
timestamp: created_at
time_grains: [month]
filters:
- field: balance_transaction_type
operator: "="
value: "'stripe_fee'"
dimensions: []
- name: stripe__mrr
label: MRR
model: ref('stripe__monthly_customer_revenue')
description: "Monthly recurring revenue."
calculation_method: sum
expression: current_month_revenue
timestamp: date_month
time_grains: [month]
filters: []
dimensions: []
- name: stripe__monthly_churned_customers
label: Monthly Churned Customers
model: ref('stripe__monthly_customer_revenue')
description: "Monthly count of customers that churned."
calculation_method: count_distinct
expression: customer_id
timestamp: date_month
time_grains: [month]
filters:
- field: current_month_revenue
operator: "<="
value: "0"
- field: previous_month_revenue
operator: ">"
value: "0"
dimensions: []
- name: stripe__monthly_recovered_customers
label: Monthly Recovered Customers
model: ref('stripe__monthly_customer_revenue')
description: "Monthly count of previously churned customers who signed up again."
calculation_method: count_distinct
expression: customer_id
timestamp: date_month
time_grains: [month]
filters:
- field: current_month_revenue
operator: ">"
value: "0"
- field: previous_month_revenue
operator: "<="
value: "0"
- field: revenue_till_previous_month
operator: ">"
value: "0"
dimensions: []
- name: stripe__monthly_new_customers
label: Monthly New Customers
model: ref('stripe__monthly_customer_revenue')
description: "Monthly count of customers that signed up for the first time."
calculation_method: count_distinct
expression: customer_id
timestamp: date_month
time_grains: [month]
filters:
- field: current_month_revenue
operator: ">"
value: "0"
- field: revenue_till_previous_month
operator: "<="
value: "0"
dimensions: []
- name: stripe__monthly_churned_customer_revenue
label: Monthly Churned Customer Revenue
model: ref('stripe__monthly_customer_revenue')
description: "Monthly revenue lost due to churned customers."
calculation_method: sum
expression: previous_month_revenue
timestamp: date_month
time_grains: [month]
filters:
- field: current_month_revenue
operator: "<="
value: "0"
- field: previous_month_revenue
operator: ">"
value: "0"
dimensions: []
- name: stripe__monthly_recovered_customer_revenue
label: Monthly Recovered Customer Revenue
model: ref('stripe__monthly_customer_revenue')
description: "Monthly revenue due to recovery of previously churned customers."
calculation_method: sum
expression: current_month_revenue
timestamp: date_month
time_grains: [month]
filters:
- field: current_month_revenue
operator: ">"
value: "0"
- field: previous_month_revenue
operator: "<="
value: "0"
- field: revenue_till_previous_month
operator: ">"
value: "0"
dimensions: []
- name: stripe__monthly_new_customer_revenue
label: Monthly New Customer Revenue
model: ref('stripe__monthly_customer_revenue')
description: "Monthly revenue due to customers that signed up for the first time."
calculation_method: sum
expression: current_month_revenue
timestamp: date_month
time_grains: [month]
filters:
- field: current_month_revenue
operator: ">"
value: "0"
- field: revenue_till_previous_month
operator: "<="
value: "0"
dimensions: []
- name: stripe__monthly_bookings
label: Monthly Bookings
model: ref('stripe__main_transactions')
description: "Monthly revenue from all transactions."
calculation_method: sum
expression: balance_transaction_amount
timestamp: created_at
time_grains: [month]
filters:
- field: balance_transaction_type
operator: "not in"
value: "('stripe_fee', 'payout', 'adjustment')"
dimensions: []