forked from pipeline-looker-blocks/salesforce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrepresentative_performance.dashboard.lookml
246 lines (233 loc) · 7.1 KB
/
representative_performance.dashboard.lookml
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
- dashboard: representative_performance
title: "Sales Representative Performance Dashboard"
layout: grid
rows:
- elements: [count_won_deals, salesrep_total_revenue, count_lost_deals, win_percentage ]
height: 150
- elements: [opportunities_to_wins_trend_peers]
height: 400
- elements: [salesrep_revenue_won_comparison]
height: 400
- elements: [salesrep_win_rate_comparison, salesrep_revenue_pipeline_comparison]
height: 400
filters:
- name: sales_rep
type: field_filter
explore: opportunity
field: opportunity_owner.name
- name: sales_segment
type: field_filter
explore: account
field: account.business_segment
# @shaun add date filter here
elements:
- name: count_won_deals
title: 'Count of Won Deals (This Quarter)'
type: single_value
model: salesforce
explore: opportunity
measures: [opportunity.count_won]
listen:
sales_segment: account.business_segment
sales_rep: opportunity_owner.name
filters:
opportunity.close_date: last quarter
limit: 500
font_size: small
text_color: '#49719a'
width: 3
height: 2
- name: salesrep_total_revenue
title: 'Salesrep - Total Revenue (This Quarter)'
type: single_value
model: salesforce
explore: opportunity
measures: [opportunity.total_revenue]
listen:
sales_segment: account.business_segment
sales_rep: opportunity_owner.name
filters:
opportunity.close_date: 'last quarter'
limit: 500
font_size: small
text_color: '#49719a'
width: 3
height: 2
- name: count_lost_deals
title: 'Count of Lost Deals (This Quarter)'
type: single_value
model: salesforce
explore: opportunity
measures: [opportunity.count_lost]
listen:
sales_segment: account.business_segment
sales_rep: opportunity_owner.name
filters:
opportunity.close_date: 'last quarter'
limit: 500
font_size: small
text_color: '#49719a'
width: 3
height: 2
- name: win_percentage
title: 'Win Percentage of Closed Deals (This Quarter)'
type: single_value
model: salesforce
explore: opportunity
measures: [opportunity.win_percentage]
listen:
sales_segment: account.business_segment
sales_rep: opportunity_owner.name
filters:
opportunity.close_date: 'last quarter'
limit: 500
font_size: small
text_color: '#49719a'
width: 3
height: 2
- name: opportunities_to_wins_trend_peers
title: 'Opportunities to Wins by Rep'
type: looker_line
model: salesforce
explore: opportunity
dimensions: [opportunity.created_month, opportunity_owner.rep_comparitor]
pivots: [opportunity_owner.rep_comparitor]
measures: [opportunity.count, opportunity.count_won]
dynamic_fields:
- table_calculation: opportunities_to_won
label: opportunities_to_won
expression: 1.0*${opportunity.count_won}/${opportunity.count}
value_format: '#.0%'
hidden_fields: [opportunity.count_won, opportunity.count]
listen:
sales_rep: opportunity_owner.name_select
filters:
opportunity.created_month: 9 months ago for 9 months
sorts: [opportunity.created_month desc, opportunity_owner.rep_comparitor]
limit: 500
column_limit: 50
query_timezone: America/Los_Angeles
stacking: ''
colors: ['#FFCC00', '#1E2023', '#3399CC', '#CC3399', '#66CC66', '#999999', '#FF4E00', '#A2ECBA', '#9932CC', '#0000CD']
show_value_labels: false
label_density: 25
font_size: small
legend_position: center
x_axis_gridlines: false
y_axis_gridlines: true
show_view_names: true
y_axis_combined: true
show_y_axis_labels: true
show_y_axis_ticks: true
y_axis_tick_density: default
y_axis_value_format: '#%'
show_x_axis_label: true
show_x_axis_ticks: true
x_axis_scale: auto
show_null_points: true
point_style: none
interpolation: linear
width: 12
height: 4
- name: salesrep_revenue_won_comparison
title: 'SalesRep - Revenue Won comparison'
type: looker_bar
model: salesforce
explore: opportunity
dimensions: [opportunity_owner.rep_comparitor]
measures: [opportunity.average_revenue_won]
listen:
sales_rep: opportunity_owner.name_select
sorts: [opportunity_owner.rep_comparitor]
limit: 500
query_timezone: America/Los_Angeles
stacking: ''
colors: ['#FFCC00', '#1E2023', '#3399CC', '#CC3399', '#66CC66', '#999999', '#FF4E00', '#A2ECBA', '#9932CC', '#0000CD']
show_value_labels: true
label_density: 25
label_color: ['#3399CC']
font_size: small
legend_position: center
hide_legend: false
x_axis_gridlines: false
y_axis_gridlines: true
show_view_names: false
y_axis_combined: true
show_y_axis_labels: true
show_y_axis_ticks: true
y_axis_labels: [Total Revenue Won]
y_axis_tick_density: default
show_x_axis_label: false
show_x_axis_ticks: true
x_axis_scale: auto
show_null_labels: false
width: 6
height: 3
- name: salesrep_win_rate_comparison
title: 'SalesRep - Win Rate Comparison'
type: looker_bar
model: salesforce
explore: opportunity
dimensions: [opportunity_owner.rep_comparitor]
measures: [opportunity.win_percentage]
listen:
sales_rep: opportunity_owner.name_select
sorts: [opportunity_owner.rep_comparitor]
limit: 500
query_timezone: America/Los_Angeles
stacking: ''
colors: ['#FFCC00', '#1E2023', '#3399CC', '#CC3399', '#66CC66', '#999999', '#FF4E00', '#A2ECBA', '#9932CC', '#0000CD']
show_value_labels: true
label_density: 25
label_color: ['#3399CC']
font_size: small
legend_position: center
hide_legend: false
x_axis_gridlines: false
y_axis_gridlines: true
show_view_names: false
y_axis_combined: true
show_y_axis_labels: true
show_y_axis_ticks: true
y_axis_labels: [Opportunity Win Rate]
y_axis_tick_density: default
show_x_axis_label: false
show_x_axis_ticks: true
x_axis_scale: auto
show_null_labels: false
width: 6
height: 3
- name: salesrep_revenue_pipeline_comparison
title: 'SalesRep - Revenue Pipeline comparison'
type: looker_bar
model: salesforce
explore: opportunity
dimensions: [opportunity_owner.rep_comparitor]
measures: [opportunity_owner.average_revenue_pipeline]
listen:
sales_rep: opportunity_owner.name_select
sorts: [opportunity_owner.rep_comparitor]
limit: 500
query_timezone: America/Los_Angeles
stacking: ''
colors: ['#FFCC00', '#1E2023', '#3399CC', '#CC3399', '#66CC66', '#999999', '#FF4E00', '#A2ECBA', '#9932CC', '#0000CD']
show_value_labels: true
label_density: 25
label_color: ['#3399CC']
font_size: small
legend_position: center
hide_legend: false
x_axis_gridlines: false
y_axis_gridlines: true
show_view_names: false
y_axis_combined: true
show_y_axis_labels: true
show_y_axis_ticks: true
y_axis_labels: [Total Revenue Pipeline]
y_axis_tick_density: default
show_x_axis_label: false
show_x_axis_ticks: true
x_axis_scale: auto
show_null_labels: false
width: 6
height: 3