--- title: Create custom aggregate functions description: Create your own custom aggregate functions in Flux using the `reduce()` function. influxdb/v2/tags: [functions, custom, flux, aggregates] menu: influxdb_v2: name: Custom aggregate functions parent: Custom functions weight: 301 aliases: - /influxdb/v2/query-data/guides/custom-functions/custom-aggregate/ related: - /iflux/v0/stdlib/universe/reduce/ source: /shared/influxdb-v2/query-data/flux/custom-functions/custom-aggregate.md ---