|
1 | 1 | ### YamlMime:TSEnum |
2 | | -name: ExcelScript.AggregationFunction |
3 | | -uid: 'ExcelScript!ExcelScript.AggregationFunction:enum' |
4 | | -package: ExcelScript! |
5 | | -fullName: ExcelScript.AggregationFunction |
6 | | -summary: Aggregation function for the `DataPivotHierarchy`<!-- -->. |
7 | | -remarks: |- |
8 | | -
|
9 | | -
|
10 | | - #### Examples |
11 | | -
|
12 | | - ```TypeScript |
13 | | - /** |
14 | | - * This script changes how the data in a PivotTable is aggregated. |
15 | | - */ |
16 | | - function main(workbook: ExcelScript.Workbook) { |
17 | | - // Get the first PivotTable in the workbook. |
18 | | - const pivotTable = workbook.getPivotTables()[0]; |
19 | | - |
20 | | - // Set the first data hierarchy to summarize with an average value, instead of a sum. |
21 | | - const dataHierarchy = pivotTable.getDataHierarchies()[0]; |
22 | | - dataHierarchy.setSummarizeBy(ExcelScript.AggregationFunction.average); |
23 | | - } |
24 | | - ``` |
25 | | -isPreview: false |
26 | | -isDeprecated: false |
27 | | -fields: |
28 | | - - name: automatic |
29 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.automatic:member' |
30 | | - package: ExcelScript! |
31 | | - summary: Excel will automatically select the aggregation based on the data items. |
32 | | - - name: average |
33 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.average:member' |
34 | | - package: ExcelScript! |
35 | | - summary: 'Aggregate using the average of the data, equivalent to the AVERAGE function.' |
36 | | - - name: count |
37 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.count:member' |
38 | | - package: ExcelScript! |
39 | | - summary: 'Aggregate using the count of items in the data, equivalent to the COUNTA function.' |
40 | | - - name: countNumbers |
41 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.countNumbers:member' |
42 | | - package: ExcelScript! |
43 | | - summary: 'Aggregate using the count of numbers in the data, equivalent to the COUNT function.' |
44 | | - - name: max |
45 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.max:member' |
46 | | - package: ExcelScript! |
47 | | - summary: 'Aggregate using the maximum value of the data, equivalent to the MAX function.' |
48 | | - - name: min |
49 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.min:member' |
50 | | - package: ExcelScript! |
51 | | - summary: 'Aggregate using the minimum value of the data, equivalent to the MIN function.' |
52 | | - - name: product |
53 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.product:member' |
54 | | - package: ExcelScript! |
55 | | - summary: 'Aggregate using the product of the data, equivalent to the PRODUCT function.' |
56 | | - - name: standardDeviation |
57 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.standardDeviation:member' |
58 | | - package: ExcelScript! |
59 | | - summary: 'Aggregate using the standard deviation of the data, equivalent to the STDEV function.' |
60 | | - - name: standardDeviationP |
61 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.standardDeviationP:member' |
62 | | - package: ExcelScript! |
63 | | - summary: 'Aggregate using the standard deviation of the data, equivalent to the STDEVP function.' |
64 | | - - name: sum |
65 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.sum:member' |
66 | | - package: ExcelScript! |
67 | | - summary: 'Aggregate using the sum of the data, equivalent to the SUM function.' |
68 | | - - name: unknown |
69 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.unknown:member' |
70 | | - package: ExcelScript! |
71 | | - summary: Aggregation function is unknown or unsupported. |
72 | | - - name: variance |
73 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.variance:member' |
74 | | - package: ExcelScript! |
75 | | - summary: 'Aggregate using the variance of the data, equivalent to the VAR function.' |
76 | | - - name: varianceP |
77 | | - uid: 'ExcelScript!ExcelScript.AggregationFunction.varianceP:member' |
78 | | - package: ExcelScript! |
79 | | - summary: 'Aggregate using the variance of the data, equivalent to the VARP function.' |
| 2 | +name: ExcelScript.AggregationFunction |
| 3 | +uid: ExcelScript!ExcelScript.AggregationFunction:enum |
| 4 | +package: ExcelScript! |
| 5 | +fullName: ExcelScript.AggregationFunction |
| 6 | +summary: Aggregation function for the `DataPivotHierarchy`<!-- -->. |
| 7 | +remarks: |- |
| 8 | +
|
| 9 | +
|
| 10 | + #### Examples |
| 11 | +
|
| 12 | + ```TypeScript |
| 13 | + /** |
| 14 | + * This script changes how the data in a PivotTable is aggregated. |
| 15 | + */ |
| 16 | + function main(workbook: ExcelScript.Workbook) { |
| 17 | + // Get the first PivotTable in the workbook. |
| 18 | + const pivotTable = workbook.getPivotTables()[0]; |
| 19 | + |
| 20 | + // Set the first data hierarchy to summarize with an average value, instead of a sum. |
| 21 | + const dataHierarchy = pivotTable.getDataHierarchies()[0]; |
| 22 | + dataHierarchy.setSummarizeBy(ExcelScript.AggregationFunction.average); |
| 23 | + } |
| 24 | + ``` |
| 25 | +
|
| 26 | +isPreview: false |
| 27 | +isDeprecated: false |
| 28 | +fields: |
| 29 | + - name: automatic |
| 30 | + uid: ExcelScript!ExcelScript.AggregationFunction.automatic:member |
| 31 | + package: ExcelScript! |
| 32 | + summary: Excel will automatically select the aggregation based on the data items. |
| 33 | + - name: average |
| 34 | + uid: ExcelScript!ExcelScript.AggregationFunction.average:member |
| 35 | + package: ExcelScript! |
| 36 | + summary: >- |
| 37 | + Aggregate using the average of the data, equivalent to the AVERAGE |
| 38 | + function. |
| 39 | + - name: count |
| 40 | + uid: ExcelScript!ExcelScript.AggregationFunction.count:member |
| 41 | + package: ExcelScript! |
| 42 | + summary: >- |
| 43 | + Aggregate using the count of items in the data, equivalent to the COUNTA |
| 44 | + function. |
| 45 | + - name: countNumbers |
| 46 | + uid: ExcelScript!ExcelScript.AggregationFunction.countNumbers:member |
| 47 | + package: ExcelScript! |
| 48 | + summary: >- |
| 49 | + Aggregate using the count of numbers in the data, equivalent to the COUNT |
| 50 | + function. |
| 51 | + - name: max |
| 52 | + uid: ExcelScript!ExcelScript.AggregationFunction.max:member |
| 53 | + package: ExcelScript! |
| 54 | + summary: >- |
| 55 | + Aggregate using the maximum value of the data, equivalent to the MAX |
| 56 | + function. |
| 57 | + - name: min |
| 58 | + uid: ExcelScript!ExcelScript.AggregationFunction.min:member |
| 59 | + package: ExcelScript! |
| 60 | + summary: >- |
| 61 | + Aggregate using the minimum value of the data, equivalent to the MIN |
| 62 | + function. |
| 63 | + - name: product |
| 64 | + uid: ExcelScript!ExcelScript.AggregationFunction.product:member |
| 65 | + package: ExcelScript! |
| 66 | + summary: >- |
| 67 | + Aggregate using the product of the data, equivalent to the PRODUCT |
| 68 | + function. |
| 69 | + - name: standardDeviation |
| 70 | + uid: ExcelScript!ExcelScript.AggregationFunction.standardDeviation:member |
| 71 | + package: ExcelScript! |
| 72 | + summary: >- |
| 73 | + Aggregate using the standard deviation of the data, equivalent to the |
| 74 | + STDEV function. |
| 75 | + - name: standardDeviationP |
| 76 | + uid: ExcelScript!ExcelScript.AggregationFunction.standardDeviationP:member |
| 77 | + package: ExcelScript! |
| 78 | + summary: >- |
| 79 | + Aggregate using the standard deviation of the data, equivalent to the |
| 80 | + STDEVP function. |
| 81 | + - name: sum |
| 82 | + uid: ExcelScript!ExcelScript.AggregationFunction.sum:member |
| 83 | + package: ExcelScript! |
| 84 | + summary: Aggregate using the sum of the data, equivalent to the SUM function. |
| 85 | + - name: unknown |
| 86 | + uid: ExcelScript!ExcelScript.AggregationFunction.unknown:member |
| 87 | + package: ExcelScript! |
| 88 | + summary: Aggregation function is unknown or unsupported. |
| 89 | + - name: variance |
| 90 | + uid: ExcelScript!ExcelScript.AggregationFunction.variance:member |
| 91 | + package: ExcelScript! |
| 92 | + summary: Aggregate using the variance of the data, equivalent to the VAR function. |
| 93 | + - name: varianceP |
| 94 | + uid: ExcelScript!ExcelScript.AggregationFunction.varianceP:member |
| 95 | + package: ExcelScript! |
| 96 | + summary: Aggregate using the variance of the data, equivalent to the VARP function. |
0 commit comments