# How do i create a trend line for a bar graph using Lens?

**URL:** <https://discuss.elastic.co/t/how-do-i-create-a-trend-line-for-a-bar-graph-using-lens/354550>\
**Category:** Kibana\
**Created:** [March 1, 2024, 6:25pm UTC](https://discuss.elastic.co/t/how-do-i-create-a-trend-line-for-a-bar-graph-using-lens/354550 "2024-03-01T18:25:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Federico\_Ruso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/federico_ruso/32/131987_2.png) [@Federico\_Ruso](https://discuss.elastic.co/u/Federico_Ruso)\
**Post date:** [March 1, 2024, 6:25pm UTC](https://discuss.elastic.co/t/how-do-i-create-a-trend-line-for-a-bar-graph-using-lens/354550/1 "2024-03-01T18:25:40Z")

</div>

Hello, i want to add a trend line for my bar graph. I'am using Lens to do that.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 2, 2024, 6:26pm UTC](https://discuss.elastic.co/t/how-do-i-create-a-trend-line-for-a-bar-graph-using-lens/354550/2 "2024-03-02T18:26:37Z")

</div>

Hi @Federico_Ruso Welcome to the community.

What version are you on?

Can you share a bit more about the bar graph.. is it a simple count or a formula?

Trend is typically a moving average.. and that should be doable ... Assuming the base aggregation/calculation is not too complex

You can add another line graph to your bar graph... That is often not clear just add another layer

Tell us a bit more and perhaps we can show you.

Here is my example

Add a layer

 ![Screenshot 2024-03-02 at 10.41.18 AM](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fb9b4ae6f1bce69feb101eb41f55fd474e746a9e.png)

 ![Screenshot 2024-03-02 at 10.40.47 AM](https://us1.discourse-cdn.com/elastic/original/3X/2/d/2d70a452d8991aa171605817bec2478e41725be8.jpeg)

---

<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 30, 2024, 6:27pm UTC](https://discuss.elastic.co/t/how-do-i-create-a-trend-line-for-a-bar-graph-using-lens/354550/3 "2024-03-30T18:27:10Z")

</div>

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