@@ -38,6 +38,8 @@ export const PipelineDashboard: Dashboard = {
3838 aggregate : 'sum' ,
3939 valueField : 'amount' ,
4040 filter : { stage : { $nin : [ 'closed_won' , 'closed_lost' ] } } ,
41+ dataset : 'opportunity_metrics' ,
42+ values : [ 'total_amount' ] ,
4143 options : { format : 'currency' , currency : 'USD' } ,
4244 layout : { x : 0 , y : 0 , w : 4 , h : 2 } ,
4345 } ,
@@ -57,6 +59,8 @@ export const PipelineDashboard: Dashboard = {
5759 } ,
5860 } ,
5961 compareTo : 'previousPeriod' ,
62+ dataset : 'opportunity_metrics' ,
63+ values : [ 'total_amount' ] ,
6064 options : { format : 'currency' , currency : 'USD' } ,
6165 layout : { x : 4 , y : 0 , w : 4 , h : 2 } ,
6266 } ,
@@ -76,6 +80,8 @@ export const PipelineDashboard: Dashboard = {
7680 } ,
7781 } ,
7882 compareTo : 'previousYear' ,
83+ dataset : 'opportunity_metrics' ,
84+ values : [ 'avg_amount' ] ,
7985 options : { format : 'currency' , currency : 'USD' } ,
8086 layout : { x : 8 , y : 0 , w : 4 , h : 2 } ,
8187 } ,
@@ -94,6 +100,9 @@ export const PipelineDashboard: Dashboard = {
94100 close_date : { $gte : '{1_years_ago}' , $lte : '{today}' } ,
95101 } ,
96102 compareTo : 'previousYear' ,
103+ dataset : 'opportunity_metrics' ,
104+ dimensions : [ 'close_date' ] ,
105+ values : [ 'opp_count' ] ,
97106 layout : { x : 0 , y : 2 , w : 8 , h : 4 } ,
98107 } ,
99108 {
@@ -111,6 +120,9 @@ export const PipelineDashboard: Dashboard = {
111120 } ,
112121 } ,
113122 compareTo : 'previousPeriod' ,
123+ dataset : 'opportunity_metrics' ,
124+ dimensions : [ 'stage' ] ,
125+ values : [ 'opp_count' ] ,
114126 layout : { x : 8 , y : 2 , w : 4 , h : 4 } ,
115127 } ,
116128
@@ -125,6 +137,9 @@ export const PipelineDashboard: Dashboard = {
125137 valueField : 'amount' ,
126138 categoryField : 'stage' ,
127139 filter : { stage : { $nin : [ 'closed_won' , 'closed_lost' ] } } ,
140+ dataset : 'opportunity_metrics' ,
141+ dimensions : [ 'stage' ] ,
142+ values : [ 'total_amount' ] ,
128143 layout : { x : 0 , y : 6 , w : 6 , h : 4 } ,
129144 } ,
130145 ] ,
0 commit comments