# Compare lists which are from group by

**URL:** https://discuss.elastic.co/t/compare-lists-which-are-from-group-by/176517
**Category:** Kibana
**Created:** [April 12, 2019, 12:56am UTC](https://discuss.elastic.co/t/compare-lists-which-are-from-group-by/176517 "2019-04-12T00:56:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Keuntek\_Lee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keuntek_lee/32/43983_2.png) [@Keuntek\_Lee](https://discuss.elastic.co/u/Keuntek_Lee)
#### Post date: [April 12, 2019, 12:56am UTC](https://discuss.elastic.co/t/compare-lists-which-are-from-group-by/176517/1 "2019-04-12T00:56:49Z")

</div>

Hello,

i'm working on KIBANA recently, and creating lots of beautiful & helpful widget 🙂

from now, i can make widgets which i planned with informative blogs, posts, guidepage.

but i stuck on one widget, which represent 'Returning User'

the plan of widget is like this,

assume that i have index data like

{ID : A, timestamp : 2019-01-01, ...}  
{ID : B, timestamp : 2019-01-01, ...}  
{ID : A, timestamp : 2019-01-02, ...}  
{ID : C, timestamp : 2019-01-02, ...}

then, i want to 'Count' of returning user who appear on today & yesterday  
on my above dataset, returning user count on 2019-01-02 should be 1(which is A).

i try to build this widget with Visual builder & metric(because i just want to count), but still have no progress with this.

as i think, i should compare unique id list of both day, like  
2019-01-01 : [A,B]  
2019-01-02 : [A,C]  
but still have no idea about how can i use groupby query regarding this requirement on 'Metric' or 'Visual Builder' page.

i need some help about this one.  
it would be great to get some comment by you guys.

Thanks.

---

<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: [April 12, 2019, 3:29pm UTC](https://discuss.elastic.co/t/compare-lists-which-are-from-group-by/176517/2 "2019-04-12T15:29:46Z")

</div>

This is not something that can really be accomplished with default Kibana visualizations. The best option for you would be to use the SQL expressions in Canvas. This is a good place to start: [https://www.elastic.co/webinars/intro-to-canvas-a-new-way-to-tell-visual-stories-in-kibana](https://www.elastic.co/webinars/intro-to-canvas-a-new-way-to-tell-visual-stories-in-kibana)

---

<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: [May 10, 2019, 3:29pm UTC](https://discuss.elastic.co/t/compare-lists-which-are-from-group-by/176517/3 "2019-05-10T15:29:54Z")

</div>

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