# Unable to set field\_name using pre-aggregated field in machine learning

**URL:** <https://discuss.elastic.co/t/unable-to-set-field-name-using-pre-aggregated-field-in-machine-learning/221136>\
**Category:** Elasticsearch\
**Created:** [February 27, 2020, 3:31am UTC](https://discuss.elastic.co/t/unable-to-set-field-name-using-pre-aggregated-field-in-machine-learning/221136 "2020-02-27T03:31:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KEVISONG](https://avatars.discourse-cdn.com/v4/letter/k/c57346/32.png) [@KEVISONG](https://discuss.elastic.co/u/KEVISONG)\
**Post date:** [February 27, 2020, 3:31am UTC](https://discuss.elastic.co/t/unable-to-set-field-name-using-pre-aggregated-field-in-machine-learning/221136/1 "2020-02-27T03:31:37Z")

</div>

I configure the datafeed with aggregation and a self-defined aggregation field naming "success\_percentage". Shown below

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/6/66c994aaa01a48723b51ca1e32d924222b45beed.png)

And the Datafeed preview shows correct output

![image](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9d2567827d86428afe3e0169048c1f875c8a257f.png)

However, as I tried to specify this field in detector, it shows doesn't match any fields

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/a/ea21d8fd21cbdef73bae32a884a566b35a2c0098.png)

How can I configure the detector in such case?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 26, 2020, 3:31am UTC](https://discuss.elastic.co/t/unable-to-set-field-name-using-pre-aggregated-field-in-machine-learning/221136/2 "2020-03-26T03:31:46Z")

</div>

Closed on March 26, 2020, 3:31am UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
