# Kibana retention rate metric and charts

**URL:** <https://discuss.elastic.co/t/kibana-retention-rate-metric-and-charts/191871>\
**Category:** Kibana\
**Created:** [July 23, 2019, 4:43pm UTC](https://discuss.elastic.co/t/kibana-retention-rate-metric-and-charts/191871 "2019-07-23T16:43:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Bao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richard_bao/32/47247_2.png) [@Richard\_Bao](https://discuss.elastic.co/u/Richard_Bao)\
**Post date:** [July 23, 2019, 4:43pm UTC](https://discuss.elastic.co/t/kibana-retention-rate-metric-and-charts/191871/1 "2019-07-23T16:43:41Z")

</div>

My case is show user use an app retention rate in last 30 day.  
value = app opened count / total installed app count  
How to do this by using Kibana?

![image](https://us1.discourse-cdn.com/elastic/original/3X/5/b/5b108744c3234ce02a9210d1def3681ac0fae12b.png)

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [July 24, 2019, 5:05pm UTC](https://discuss.elastic.co/t/kibana-retention-rate-metric-and-charts/191871/2 "2019-07-24T17:05:38Z")

</div>

Hey @Richard_Bao, if you can provide additional information regarding how your data is structured in Kibana we can help further. You'll most likely want to use the Time Series Visual Builder Metric visualization: [https://www.elastic.co/guide/en/kibana/current/TSVB.html](https://www.elastic.co/guide/en/kibana/current/TSVB.html)

---

<div class="post-metadata">

**Author:** ![Richard\_Bao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richard_bao/32/47247_2.png) [@Richard\_Bao](https://discuss.elastic.co/u/Richard_Bao)\
**Post date:** [July 24, 2019, 6:34pm UTC](https://discuss.elastic.co/t/kibana-retention-rate-metric-and-charts/191871/3 "2019-07-24T18:34:26Z")

</div>

Hi Brandon,

Thanks for reply!  
The user schema is as follow, means who installed the app. The "created\_on" can be the date when install the app.  
{  
"created\_on" : {  
"type" : "date"  
},  
"dob" : {  
"type" : "date"  
},  
"email" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"fullname" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"id" : {  
"type" : "long"  
},  
...  
}

app usage schema is as follow:  
{  
"appid" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"user\_id" : {  
"type" : "long"  
},  
"duration" : {  
"type" : "long"  
},  
"end\_time" : {  
"type" : "date"  
},  
"id" : {  
"type" : "long"  
},  
"start\_time" : {  
"type" : "date"  
}  
}

So last 30 day app retention rate should be unique count of user who open the app (based on "start\_time") divide by the total user who installed the app. The chart will show 5 day retention rate, 10 days retention rate,..., 30 days retention rate. All the 5, 10,.. days period should be total user number who installed the app before the date.

---

<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:** [August 21, 2019, 6:34pm UTC](https://discuss.elastic.co/t/kibana-retention-rate-metric-and-charts/191871/4 "2019-08-21T18:34:46Z")

</div>

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