# AggregationProperty

Defines an aggregation function to be applied to grouped data, creating a new column with the calculated result.

- Source: Generated at build time
- Type last changed: v2.224.0 · 13 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_quicksight as quicksight } from 'aws-cdk-lib';
const aggregationProperty: quicksight.CfnDataSet.AggregationProperty = {
  aggregationFunction: {
    listAggregation: {
      distinct: false,
      separator: 'separator',

      // the properties below are optional
      inputColumnName: 'inputColumnName',
    },
    percentileAggregation: {
      percentileValue: 123,

      // the properties below are optional
      inputColumnName: 'inputColumnName',
    },
    simpleAggregation: {
      functionType: 'functionType',

      // the properties below are optional
      inputColumnName: 'inputColumnName',
    },
  },
  newColumnId: 'newColumnId',
  newColumnName: 'newColumnName',
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_quicksight as quicksight

aggregation_property = quicksight.CfnDataSet.AggregationProperty(
    aggregation_function=quicksight.CfnDataSet.DataPrepAggregationFunctionProperty(
        list_aggregation=quicksight.CfnDataSet.DataPrepListAggregationFunctionProperty(
            distinct=False,
            separator="separator",

            # the properties below are optional
            input_column_name="inputColumnName"
        ),
        percentile_aggregation=quicksight.CfnDataSet.DataPrepPercentileAggregationFunctionProperty(
            percentile_value=123,

            # the properties below are optional
            input_column_name="inputColumnName"
        ),
        simple_aggregation=quicksight.CfnDataSet.DataPrepSimpleAggregationFunctionProperty(
            function_type="functionType",

            # the properties below are optional
            input_column_name="inputColumnName"
        )
    ),
    new_column_id="newColumnId",
    new_column_name="newColumnName"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.quicksight.*;

AggregationProperty aggregationProperty = AggregationProperty.builder()
        .aggregationFunction(DataPrepAggregationFunctionProperty.builder()
                .listAggregation(DataPrepListAggregationFunctionProperty.builder()
                        .distinct(false)
                        .separator("separator")

                        // the properties below are optional
                        .inputColumnName("inputColumnName")
                        .build())
                .percentileAggregation(DataPrepPercentileAggregationFunctionProperty.builder()
                        .percentileValue(123)

                        // the properties below are optional
                        .inputColumnName("inputColumnName")
                        .build())
                .simpleAggregation(DataPrepSimpleAggregationFunctionProperty.builder()
                        .functionType("functionType")

                        // the properties below are optional
                        .inputColumnName("inputColumnName")
                        .build())
                .build())
        .newColumnId("newColumnId")
        .newColumnName("newColumnName")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.QuickSight;

var aggregationProperty = new AggregationProperty {
    AggregationFunction = new DataPrepAggregationFunctionProperty {
        ListAggregation = new DataPrepListAggregationFunctionProperty {
            Distinct = false,
            Separator = "separator",

            // the properties below are optional
            InputColumnName = "inputColumnName"
        },
        PercentileAggregation = new DataPrepPercentileAggregationFunctionProperty {
            PercentileValue = 123,

            // the properties below are optional
            InputColumnName = "inputColumnName"
        },
        SimpleAggregation = new DataPrepSimpleAggregationFunctionProperty {
            FunctionType = "functionType",

            // the properties below are optional
            InputColumnName = "inputColumnName"
        }
    },
    NewColumnId = "newColumnId",
    NewColumnName = "newColumnName"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

aggregationProperty := &AggregationProperty{
	AggregationFunction: &DataPrepAggregationFunctionProperty{
		ListAggregation: &DataPrepListAggregationFunctionProperty{
			Distinct: jsii.Boolean(false),
			Separator: jsii.String("separator"),

			// the properties below are optional
			InputColumnName: jsii.String("inputColumnName"),
		},
		PercentileAggregation: &DataPrepPercentileAggregationFunctionProperty{
			PercentileValue: jsii.Number(123),

			// the properties below are optional
			InputColumnName: jsii.String("inputColumnName"),
		},
		SimpleAggregation: &DataPrepSimpleAggregationFunctionProperty{
			FunctionType: jsii.String("functionType"),

			// the properties below are optional
			InputColumnName: jsii.String("inputColumnName"),
		},
	},
	NewColumnId: jsii.String("newColumnId"),
	NewColumnName: jsii.String("newColumnName"),
}
```

## Properties

- `aggregationFunction`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDataSet.DataPrepAggregationFunctionProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_quicksight.CfnDataSet.DataPrepAggregationFunctionProperty.html) (required) — The aggregation function to apply, such as `SUM` , `COUNT` , `AVERAGE` , `MIN` , `MAX`.

- `newColumnId`: string (required) — A unique identifier for the new column that will contain the aggregated values.

- `newColumnName`: string (required) — The name for the new column that will contain the aggregated values.
