# DataSourceAggregatesFactory

## Methods

### Min()

Applies the Min aggregate function.

#### RETURNS

The [DataSourceAggregatesFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceaggregatesfactory) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Min();
                    })
            )
             
```

### Max()

Applies the Max aggregate function.

#### RETURNS

The [DataSourceAggregatesFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceaggregatesfactory) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Max();
                    })
            )
             
```

### Count()

Applies the Count aggregate function.

#### RETURNS

The [DataSourceAggregatesFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceaggregatesfactory) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Count();
                    })
            )
             
```

### Average()

Applies the Average aggregate function.

#### RETURNS

The [DataSourceAggregatesFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceaggregatesfactory) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Average();
                    })
            )
             
```

### Sum()

Applies the Sum aggregate function.

#### RETURNS

The [DataSourceAggregatesFactory](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/datasourceaggregatesfactory) instance for method chaining.

#### Example

```
 
            .DataSource(dataSource => dataSource
                    .Custom()
                    .Aggregates(aggregates =>
                    {
                        aggregates.Add(p => p.UnitsInStock).Sum();
                    })
            )
             
```
