|
This command dynamically calculates a column summary value (in this example, the average) and then keeps or removes rows according to how they compare to it.
One of the real advantages of this command is its dynamic nature. If you have performed an analytic operation which has reduced or added rows, or if you have done a numerical operation which has changed the cell values, this command continues to work as expected since the avergae is calculated on the current data set.
Script Overview
-
The AddData allows you to load a csv file or a nextanalytics optimized data file. As an alternative, you could also execute a SQL Query.
-
FilterByValue searches for rows which are less than the column average. In this example, it is looking in the column labeled 12/06. Other variations are possible by altering the parameters. This command can be experimented with using the Author Mode user interface.
-
ChangeAlertTo alters the color coding based on the parameters. This command can be experimented with using the Author Mode user interface.
In the following script, PageCaption and PageDescription commands provide "business context" for each page being displayed.
Script
-
adddata , actuals.csv
-
PageCaption , "This is sample data"
-
PageDescription , "This data will be used to show how easy it is to remove any rows that are less than the dynamically calculated average (of the page) in a designated column"
-
;--------------
-
FilterByValue,RemoveByVal,LessThan,Row,-1,12/06,False,0,0,False,Average
-
ChangeAlertTo,axis,-1,Column,Average,0,True,,-1
-
PageCaption , "Above average in 12/06"
-
PageDescription , "Row less than average in 12/06 have been removed. The color coding is based on the newly calculated average which demonstrates a core feature that calculations are dynamic in the current page. Thus, anything that is green in 12/06 means that they are above the newly calculated average, and thesee were already determined to be above the average in the original set of data. These are the best of the best."
Results
This is sample data
This data will be used to show how easy it is to remove any rows that are less than the dynamically calculated average (of the page) in a designated column
| Name |
Region |
Position |
01/06 |
02/06 |
03/06 |
04/06 |
05/06 |
06/06 |
07/06 |
08/06 |
09/06 |
10/06 |
11/06 |
12/06 |
| Ted Burton |
Central |
Account Manager |
33,900 |
62,100 |
106,200 |
37,100 |
115,600 |
151,700 |
58,500 |
102,400 |
177,700 |
83,000 |
133,600 |
210,400 |
| Nell Gordon |
Central |
Sr. Account Manager |
87,200 |
172,700 |
300,100 |
85,700 |
49,400 |
47,500 |
68,700 |
11,400 |
123,200 |
109,200 |
202,100 |
152,400 |
| Bonnie Mills |
Central |
Account Manager |
25,800 |
75,100 |
77,300 |
71,500 |
32,900 |
14,700 |
44,000 |
13,400 |
227,000 |
98,400 |
120,000 |
173,800 |
| Juan Perez |
Central |
Account Manager |
25,000 |
32,900 |
117,600 |
67,900 |
104,600 |
62,700 |
55,600 |
54,800 |
18,000 |
18,500 |
109,600 |
233,000 |
| Jonathan Ryan |
Central |
Account Representative |
0 |
0 |
0 |
0 |
0 |
0 |
16,600 |
32,000 |
34,800 |
6,700 |
4,800 |
84,800 |
| Marcus Saul |
Central |
Account Manager |
25,000 |
46,000 |
22,500 |
25,800 |
76,400 |
199,200 |
11,100 |
67,800 |
203,300 |
44,100 |
65,300 |
193,500 |
| Jerry Wong |
Central |
Sr. Account Manager |
99,000 |
159,700 |
63,200 |
7,200 |
169,700 |
286,200 |
83,700 |
231,600 |
251,700 |
155,600 |
208,000 |
314,900 |
| Will Hill |
Federal |
Account Representative |
16,200 |
15,700 |
22,300 |
13,500 |
43,100 |
29,900 |
11,900 |
46,600 |
44,200 |
32,000 |
6,100 |
122,600 |
| Gil Jacobs |
Federal |
Account Manager |
57,600 |
42,500 |
88,200 |
23,600 |
74,700 |
186,400 |
66,400 |
113,700 |
214,900 |
18,300 |
142,700 |
198,700 |
| Larry Kelley |
Federal |
Account Manager |
1,200 |
22,900 |
97,400 |
68,700 |
99,200 |
38,100 |
86,900 |
107,600 |
31,700 |
63,900 |
109,500 |
203,800 |
|
Above average in 12/06
Row less than average in 12/06 have been removed. The color coding is based on the newly calculated average which demonstrates a core feature that calculations are dynamic in the current page. Thus, anything that is green in 12/06 means that they are above the newly calculated average, and thesee were already determined to be above the average in the original set of data. These are the best of the best.
| Name |
Region |
Position |
01/06 |
02/06 |
03/06 |
04/06 |
05/06 |
06/06 |
07/06 |
08/06 |
09/06 |
10/06 |
11/06 |
12/06 |
| Ted Burton |
Central |
Account Manager |
33,900 |
62,100 |
106,200 |
37,100 |
115,600 |
151,700 |
58,500 |
102,400 |
177,700 |
83,000 |
133,600 |
210,400 |
| Nell Gordon |
Central |
Sr. Account Manager |
87,200 |
172,700 |
300,100 |
85,700 |
49,400 |
47,500 |
68,700 |
11,400 |
123,200 |
109,200 |
202,100 |
152,400 |
| Bonnie Mills |
Central |
Account Manager |
25,800 |
75,100 |
77,300 |
71,500 |
32,900 |
14,700 |
44,000 |
13,400 |
227,000 |
98,400 |
120,000 |
173,800 |
| Juan Perez |
Central |
Account Manager |
25,000 |
32,900 |
117,600 |
67,900 |
104,600 |
62,700 |
55,600 |
54,800 |
18,000 |
18,500 |
109,600 |
233,000 |
| Marcus Saul |
Central |
Account Manager |
25,000 |
46,000 |
22,500 |
25,800 |
76,400 |
199,200 |
11,100 |
67,800 |
203,300 |
44,100 |
65,300 |
193,500 |
| Jerry Wong |
Central |
Sr. Account Manager |
99,000 |
159,700 |
63,200 |
7,200 |
169,700 |
286,200 |
83,700 |
231,600 |
251,700 |
155,600 |
208,000 |
314,900 |
| Gil Jacobs |
Federal |
Account Manager |
57,600 |
42,500 |
88,200 |
23,600 |
74,700 |
186,400 |
66,400 |
113,700 |
214,900 |
18,300 |
142,700 |
198,700 |
| Larry Kelley |
Federal |
Account Manager |
1,200 |
22,900 |
97,400 |
68,700 |
99,200 |
38,100 |
86,900 |
107,600 |
31,700 |
63,900 |
109,500 |
203,800 |
| Phillip White |
Federal |
Account Manager |
62,300 |
106,000 |
82,200 |
18,000 |
41,900 |
74,100 |
71,100 |
94,600 |
125,300 |
56,900 |
19,600 |
182,900 |
| Anne Grenier |
International |
Account Manager |
70,200 |
113,200 |
14,000 |
58,100 |
87,600 |
202,200 |
80,600 |
85,400 |
137,700 |
100,000 |
27,200 |
201,900 |
|
|