# Timelion returns incorrect data

**URL:** https://discuss.elastic.co/t/timelion-returns-incorrect-data/205935
**Category:** Kibana
**Tags:** timelion
**Created:** [October 30, 2019, 6:38pm UTC](https://discuss.elastic.co/t/timelion-returns-incorrect-data/205935 "2019-10-30T18:38:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jasmineL](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@jasmineL](https://discuss.elastic.co/u/jasmineL)
#### Post date: [October 30, 2019, 6:38pm UTC](https://discuss.elastic.co/t/timelion-returns-incorrect-data/205935/1 "2019-10-30T18:38:39Z")

</div>

I am using Kibana 5.6 Timelion right now and found some weird behavior.  
I am setting an absolute time 2019-10-29 00:00:00.000 to 2019-10-29 23:59:59.999. And split rows by date histogram with daily interval. The data table returns me 1 data which is as expected. But in timelion will give me 2 data, both are the same value from the result of data table. Please see below screenshot.  
Screenshot from Data Table

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0eeeddc587e6a792d974ae56452754259570445c.png)  
Screenshot from Timelion  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/3/83f259d4b84731153d7362b6847aa72e7e73dc7a.png)

And here is the payload from timelion. Hope this will help.  
`{"sheet":[".es(index='sa-gec.com_prereturn_join', timefield='PreReturn.creation_ts', q=\"(Vars_PreReturn.lad_segment:(lad_seg1 or lad_seg2)) AND (_exists_:PostReturn.creation_ts)\").label('LAD Daily Count').bars(15)"],"extended":{"es":{"filter":{"bool":{"must":[{"match_all":{}}],"must_not":[]}}}},"time":{"from":"2019-10-29T07:00:00.000Z","to":"2019-10-30T06:59:59.999Z","mode":"absolute","interval":"1d","timezone":"America/Los_Angeles"}}`

Could you please give me some clue how can I make timelion work as expected? Like return only one day data?

Thanks a lot.  
Jasmine

---

<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: [November 18, 2019, 4:15pm UTC](https://discuss.elastic.co/t/timelion-returns-incorrect-data/205935/2 "2019-11-18T16:15:44Z")

</div>

That might be from the timelion handling partial buckets. I'm not aware on how it was in 5.6 as that is a couple years old, but you could try and add ".trim(0,0)" at the end of your query.

---

<div class="post-metadata">

### Author: ![jasmineL](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@jasmineL](https://discuss.elastic.co/u/jasmineL)
#### Post date: [November 28, 2019, 4:08am UTC](https://discuss.elastic.co/t/timelion-returns-incorrect-data/205935/3 "2019-11-28T04:08:01Z")

</div>

Hi @Marius_Dragomir,

Really sorry to reply you this late....  
I checked newer version 6.8 have the same issue. Even adding .trim(0.0) doesn't help.  
It actually very easy to reproduce.

I changed the time frame to absolute from 2019-11-27 00:00:00.000 to 2019-11-27 23:59:59.999.  
And then add a very simple query like:  
.es(index='bot\_log', timefield='ts').bars(15).trim(0,0). And interval to 1d.

You will see 2 bars on the chart shows. Both have same value.  
When I try exactly same from data table and I got only 1 response which should be correct behavior.

Just wondering what should I do on timelion to get the same behavior.

Thanks a lot!

---

<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: [December 26, 2019, 4:08am UTC](https://discuss.elastic.co/t/timelion-returns-incorrect-data/205935/4 "2019-12-26T04:08:04Z")

</div>

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