-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathexcelscript.aggregationfunction.yml
More file actions
79 lines (75 loc) · 3.51 KB
/
Copy pathexcelscript.aggregationfunction.yml
File metadata and controls
79 lines (75 loc) · 3.51 KB
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
### YamlMime:TSEnum
name: ExcelScript.AggregationFunction
uid: 'ExcelScript!ExcelScript.AggregationFunction:enum'
package: ExcelScript!
fullName: ExcelScript.AggregationFunction
summary: Aggregation function for the `DataPivotHierarchy`<!-- -->.
remarks: |-
#### Examples
```TypeScript
/**
* This script changes how the data in a PivotTable is aggregated.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the first PivotTable in the workbook.
const pivotTable = workbook.getPivotTables()[0];
// Set the first data hierarchy to summarize with an average value, instead of a sum.
const dataHierarchy = pivotTable.getDataHierarchies()[0];
dataHierarchy.setSummarizeBy(ExcelScript.AggregationFunction.average);
}
```
isPreview: false
isDeprecated: false
fields:
- name: automatic
uid: 'ExcelScript!ExcelScript.AggregationFunction.automatic:member'
package: ExcelScript!
summary: Excel will automatically select the aggregation based on the data items.
- name: average
uid: 'ExcelScript!ExcelScript.AggregationFunction.average:member'
package: ExcelScript!
summary: 'Aggregate using the average of the data, equivalent to the AVERAGE function.'
- name: count
uid: 'ExcelScript!ExcelScript.AggregationFunction.count:member'
package: ExcelScript!
summary: 'Aggregate using the count of items in the data, equivalent to the COUNTA function.'
- name: countNumbers
uid: 'ExcelScript!ExcelScript.AggregationFunction.countNumbers:member'
package: ExcelScript!
summary: 'Aggregate using the count of numbers in the data, equivalent to the COUNT function.'
- name: max
uid: 'ExcelScript!ExcelScript.AggregationFunction.max:member'
package: ExcelScript!
summary: 'Aggregate using the maximum value of the data, equivalent to the MAX function.'
- name: min
uid: 'ExcelScript!ExcelScript.AggregationFunction.min:member'
package: ExcelScript!
summary: 'Aggregate using the minimum value of the data, equivalent to the MIN function.'
- name: product
uid: 'ExcelScript!ExcelScript.AggregationFunction.product:member'
package: ExcelScript!
summary: 'Aggregate using the product of the data, equivalent to the PRODUCT function.'
- name: standardDeviation
uid: 'ExcelScript!ExcelScript.AggregationFunction.standardDeviation:member'
package: ExcelScript!
summary: 'Aggregate using the standard deviation of the data, equivalent to the STDEV function.'
- name: standardDeviationP
uid: 'ExcelScript!ExcelScript.AggregationFunction.standardDeviationP:member'
package: ExcelScript!
summary: 'Aggregate using the standard deviation of the data, equivalent to the STDEVP function.'
- name: sum
uid: 'ExcelScript!ExcelScript.AggregationFunction.sum:member'
package: ExcelScript!
summary: 'Aggregate using the sum of the data, equivalent to the SUM function.'
- name: unknown
uid: 'ExcelScript!ExcelScript.AggregationFunction.unknown:member'
package: ExcelScript!
summary: Aggregation function is unknown or unsupported.
- name: variance
uid: 'ExcelScript!ExcelScript.AggregationFunction.variance:member'
package: ExcelScript!
summary: 'Aggregate using the variance of the data, equivalent to the VAR function.'
- name: varianceP
uid: 'ExcelScript!ExcelScript.AggregationFunction.varianceP:member'
package: ExcelScript!
summary: 'Aggregate using the variance of the data, equivalent to the VARP function.'