# Filter data, count them and graph showing with time

**URL:** <https://community.influxdata.com/t/filter-data-count-them-and-graph-showing-with-time/26325>\
**Category:** Systems\
**Tags:** influxdb, telegraf, flux\
**Created:** [August 30, 2022, 6:58am UTC](https://community.influxdata.com/t/filter-data-count-them-and-graph-showing-with-time/26325 "2022-08-30T06:58:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![B\_M](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/b_m/32/10712_2.png) [@B\_M](https://community.influxdata.com/u/B_M)\
**Post date:** [August 30, 2022, 6:58am UTC](https://community.influxdata.com/t/filter-data-count-them-and-graph-showing-with-time/26325/1 "2022-08-30T06:58:24Z")

</div>

Hello,  
I’m trying to filter and count the same results, and showing on graph with time series.In my case, source is telegraf(json url) and destination is influxdb.  
My input json file are:  
{  
“items” : [  
{ “ID” : “10.1003”, “host” : “Storage”, “AlarmLevel” : “Major”, “iSerialNo” : 806868, “dtOccurTime” : “1661144989915” },  
{ “ID” : “10.1003”, “host” : “Storage”, “AlarmLevel” : “Critical”, “iSerialNo” : 806896, “dtOccurTime” : “1661756400000” },  
{ “ID” : “10.1001”, “host” : “VM”, “AlarmLevel” : “Minor”, “iSerialNo” : 806842, “dtOccurTime” : “1661729238683” },  
{ “ID” : “10.1002”, “host” : “Network”, “AlarmLevel” : “Major”, “iSerialNo” : 806872, “dtOccurTime” : “1661720934451” },  
{ “ID” : “10.1003”, “host” : “Storage”, “AlarmLevel” : “Major”, “iSerialNo” : 806875, “dtOccurTime” : “1661241960000” },  
{ “ID” : “10.1003”, “host” : “Network”, “AlarmLevel” : “Major”, “iSerialNo” : 806832, “dtOccurTime” : “1661164998683” }  
],  
}

I’d like to show on the graph which count of the same data on json where  
host== **Storage** and  
AlarmLevel == “Major”  
f exmpl: now, count of the data is 2 (Storage:Major).  
Please, Help write the code

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [September 2, 2022, 7:08pm UTC](https://community.influxdata.com/t/filter-data-count-them-and-graph-showing-with-time/26325/2 "2022-09-02T19:08:55Z")

</div>

Hello @B_M,  
I believe I answered this question on this post:  
[https://community.influxdata.com/t/filter-data-and-count-them-and-to-graph-with-keeping-other-data/26321/4](https://community.influxdata.com/t/filter-data-and-count-them-and-to-graph-with-keeping-other-data/26321/4)  
If I’m mistaken and this isn’t a duplicate question, please let me know.
