# How can I run aggregateWindow function where fn param can have different value for different field?

**URL:** <https://community.influxdata.com/t/how-can-i-run-aggregatewindow-function-where-fn-param-can-have-different-value-for-different-field/18310>\
**Category:** InfluxDB 2\
**Tags:** flux\
**Created:** [February 11, 2021, 5:53pm UTC](https://community.influxdata.com/t/how-can-i-run-aggregatewindow-function-where-fn-param-can-have-different-value-for-different-field/18310 "2021-02-11T17:53:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![scott](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/scott/32/16492_2.png) [@scott](https://community.influxdata.com/u/scott)\
**Post date:** [February 11, 2021, 9:21pm UTC](https://community.influxdata.com/t/how-can-i-run-aggregatewindow-function-where-fn-param-can-have-different-value-for-different-field/18310/2 "2021-02-11T21:21:50Z")

</div>

@pavanvora Flux will return each field in separate tables because InfluxDB returns data group by series, and the field key is part of the series key. There are a few ways you can do accomplish what you’re trying to do that are outlined in this similar thread: [InfluxQL to new task FLUX with resample and group](https://community.influxdata.com/t/influxql-to-new-task-flux-with-resample-and-group/18266)

---

_[View the full topic](https://community.influxdata.com/t/how-can-i-run-aggregatewindow-function-where-fn-param-can-have-different-value-for-different-field/18310)._
