# Generate monthly report from elastic index

**URL:** <https://discuss.elastic.co/t/generate-monthly-report-from-elastic-index/342691>\
**Category:** Elasticsearch\
**Created:** [September 11, 2023, 2:56am UTC](https://discuss.elastic.co/t/generate-monthly-report-from-elastic-index/342691 "2023-09-11T02:56:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonREC](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@JasonREC](https://discuss.elastic.co/u/JasonREC)\
**Post date:** [September 11, 2023, 2:56am UTC](https://discuss.elastic.co/t/generate-monthly-report-from-elastic-index/342691/1 "2023-09-11T02:56:54Z")

</div>

Hi, I want to generate a monthly report from my elastic index  
Currently, I have an index which contains **time series** data from July to now(Sep)

after September, I want to generate the summary report of July, Aug And Sep respectively.

The doc in index look like this,

{  
"userName": "Martin",  
"key": "213adadasdas2131",  
"userID": "101",  
"function\_id": "99",  
},

{  
"userName": "Tom",  
"key": "sadqewq12321",  
"userID": "102",  
"function\_id": "49",  
}

I want to know the total number of function id each user called in a month?  
how many times each function has been called in each month?

I wonder to generate a monthly report like this, using Elastic watcher with custom aggreation query is the best way?

---

<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:** [October 9, 2023, 2:57am UTC](https://discuss.elastic.co/t/generate-monthly-report-from-elastic-index/342691/2 "2023-10-09T02:57:19Z")

</div>

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