# Trend charts problems

**URL:** https://discuss.elastic.co/t/trend-charts-problems/202720
**Category:** Kibana
**Created:** [October 8, 2019, 8:21pm UTC](https://discuss.elastic.co/t/trend-charts-problems/202720 "2019-10-08T20:21:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ahmed.louati](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@ahmed.louati](https://discuss.elastic.co/u/ahmed.louati)
#### Post date: [October 8, 2019, 8:21pm UTC](https://discuss.elastic.co/t/trend-charts-problems/202720/1 "2019-10-08T20:21:29Z")

</div>

Hi Elastic,  
How can I use scripted fileld result but as a filter aggregation not as terms in trend charts. And can I filter the result by comparing it with a fix value ??

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [October 11, 2019, 1:29pm UTC](https://discuss.elastic.co/t/trend-charts-problems/202720/2 "2019-10-11T13:29:02Z")

</div>

The scripted fields are not intended to be used in too many places, so there are limitations for them. Filters do work, if you use KQL instead of Lucene, just with the standard syntax.  
And the same stands for the filter aggregation, use KQL for the filters instead of Lucene. This choice is a relatively new feature, i think it 7.3+.

---

<div class="post-metadata">

### Author: ![ahmed.louati](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@ahmed.louati](https://discuss.elastic.co/u/ahmed.louati)
#### Post date: [October 17, 2019, 7:22am UTC](https://discuss.elastic.co/t/trend-charts-problems/202720/3 "2019-10-17T07:22:43Z")

</div>

Thanks @Marius_Dragomir for the response.

---

<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: [November 14, 2019, 7:22am UTC](https://discuss.elastic.co/t/trend-charts-problems/202720/4 "2019-11-14T07:22:47Z")

</div>

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