1- version : 2
21models :
32- name : deals
43 meta :
54 description : All sales deals of any status, pulled from our CRM
65 primary_key : deal_id
6+ order_fields_by : ' index'
77 ai_hint : |
88 CloseRate Kevin: This is your primary deals model for analyzing pipeline progression and win/loss performance.
99 Use this to measure stage-to-stage conversion (New → Qualified → PoC → Negotiation → Won/Lost), calculate win rates, and identify stalled deals.
1010 Key dimensions: `stage` (with stages: New, Qualified, PoC, Negotiation, Won, Lost), `created_date` (for cohort analysis).
1111 Core metrics: `win_rate` (won deals / total deals), stage-specific counts (`new_deals`, `qualified_deals`, `poc_deals`, `negotiation_deals`, `won_deals`, `lost_deals`), `total_amount`, `total_won_amount`.
1212 Critical for AE performance analysis. Focus on demo-to-close rates (PoC → Negotiation → Won conversion) and identifying aging deals at each stage.
1313 Default to line charts for trend analysis, with period-over-period comparisons using `created_date` dimensions.
14-
15- explores :
16- deals_accounts :
17- required_attributes :
18- is_admin_saas_demo : " true"
19- label : ' Deals w/Accounts'
20- description : The Deals table with the Accounts table details included (only accessible by admins since it includes account names)
21- joins :
22- - join : accounts
23- relationship : many-to-one
24- sql_on : ${deals.account_id} = ${accounts.account_id}
25- deals_accounts_no_names :
26- label : ' Deals w/Accounts (no Names)'
27- description : The deals table with the Accounts table details included, except for names (to keep anonymous)
28- joins :
29- - join : accounts
30- relationship : many-to-one
31- sql_on : ${deals.account_id} = ${accounts.account_id}
32- fields : [industry, segment, unique_accounts, unique_smb_accounts, unique_midmarket_accounts, unique_enterprise_accounts]
3314
3415 parameters :
3516 deal_value_toggle :
@@ -48,39 +29,16 @@ models:
4829 type : left
4930 relationship : one-to-many
5031
51- metrics :
52- win_rate :
53- type : number
54- description : The percentage of deals that have been won
55- format : percent
56- sql : ${won_deals} / NULLIF(${unique_deals}, 0)
57- spotlight :
58- visibility : show
59- categories :
60- - kpi
61- ai_hint : |
62- CloseRate Kevin: Use `win_rate` to measure overall deal closure effectiveness (won deals ÷ total deals).
63- This is a core KPI for AE performance. Break down by time period (week, month, quarter) to identify trends.
64- Compare period-over-period to spot declining win rates early. Pair with `loss_rate` to understand win/loss balance.
65- loss_rate :
66- type : number
67- format : percent
68- sql : ${lost_deals} / NULLIF(${unique_deals}, 0)
69- win_vs_lost_ratio :
70- type : number
71- round : 2
72- sql : ${lost_deals} / NULLIF(${won_deals}, 0)
73-
7432 columns :
7533 - name : deal_id
7634 description : " The unique identified for a Deal"
7735 meta :
7836 dimension :
7937 type : string
38+ label : Deal ID
8039 metrics :
8140 unique_deals :
8241 type : count_distinct
83- groups : ['Deal Counts']
8442 description : Count unique deals based on Account ID (each account can only have one deal)
8543 spotlight :
8644 visibility : show
@@ -146,6 +104,38 @@ models:
146104 visibility : show
147105 categories :
148106 - sales
107+ win_rate :
108+ type : number
109+ description : The percentage of deals that have been won
110+ format : percent
111+ sql : ${won_deals} / NULLIF(${unique_deals}, 0)
112+ spotlight :
113+ visibility : show
114+ categories :
115+ - kpi
116+ ai_hint : |
117+ CloseRate Kevin: Use `win_rate` to measure overall deal closure effectiveness (won deals ÷ total deals).
118+ This is a core KPI for AE performance. Break down by time period (week, month, quarter) to identify trends.
119+ Compare period-over-period to spot declining win rates early. Pair with `loss_rate` to understand win/loss balance.
120+ groups : ['Rates & Ratios']
121+ loss_rate :
122+ type : number
123+ format : percent
124+ sql : ${lost_deals} / NULLIF(${unique_deals}, 0)
125+ groups : ['Rates & Ratios']
126+ win_vs_lost_ratio :
127+ type : number
128+ round : 2
129+ sql : ${lost_deals} / NULLIF(${won_deals}, 0)
130+ groups : ['Rates & Ratios']
131+
132+
133+ - name : created_date
134+ description : " The date the deal was created"
135+ meta :
136+ dimension :
137+ type : date
138+ time_intervals : ['DAY', 'WEEK', 'MONTH', 'MONTH_NAME', 'YEAR', 'QUARTER']
149139 - name : account_id
150140 description : " The Account ID from our database"
151141 meta :
@@ -190,23 +180,26 @@ models:
190180 meta :
191181 dimension :
192182 type : number
183+ hidden : true
193184 metrics :
194185 total_seats :
195186 type : sum
196187 description : The sum of seats for selected deals
188+ groups : ['Seats']
197189 average_seats :
198190 type : average
199191 round : 0
192+ groups : ['Seats']
200193 description : The average number of seats per deal for selected deals
201194 - name : amount
202195 description : " The deal amount based on plan price per seat multiplied by seats"
203196 meta :
204197 dimension :
205198 type : number
199+ hidden : true
206200 format : ' $#,##0'
207201 metrics :
208202 total_amount :
209- groups : ['Deal Amounts']
210203 type : sum
211204 description : The sum of deal amount for selected deals
212205 format : ' $#,##0'
@@ -219,16 +212,16 @@ models:
219212 CloseRate Kevin: Use `total_amount` to measure total pipeline value across all deal stages.
220213 Track over time to monitor pipeline health and growth. Break down by `stage` to see value distribution across funnel stages.
221214 total_won_amount :
222- groups : ['Deal Amounts']
223- type : sum
224- description : The sum of deal amount for won deals
225- format : ' $#,##0'
226- filters :
227- - stage : ' Won'
228- ai_hint : |
229- CloseRate Kevin: Use `total_won_amount` to measure actual closed revenue—your core revenue KPI.
230- Track by time period (week, month, quarter) to monitor revenue trends. Compare period-over-period for growth analysis.
231- spotlight :
215+ groups : ['Deal Amounts']
216+ type : sum
217+ description : The sum of deal amount for won deals
218+ format : ' $#,##0'
219+ filters :
220+ - stage : ' Won'
221+ ai_hint : |
222+ CloseRate Kevin: Use `total_won_amount` to measure actual closed revenue—your core revenue KPI.
223+ Track by time period (week, month, quarter) to monitor revenue trends. Compare period-over-period for growth analysis.
224+ spotlight :
232225 visibility : show
233226 categories :
234227 - kpi
@@ -255,9 +248,3 @@ models:
255248 format : ' $#,##0'
256249 filters :
257250 - stage : ' Won'
258- - name : created_date
259- description : " The date the deal was created"
260- meta :
261- dimension :
262- type : date
263- time_intervals : ['DAY', 'WEEK', 'MONTH', 'MONTH_NAME', 'YEAR', 'QUARTER']
0 commit comments