Dashboards & Visualizations

Increment Count Totals over a Line Chart

jzwulf
Engager

I have a set of data that has a data field inside that shows when an asset has been assigned. Right now, we're pulling the total count of those assets, but have been asked to show an incrementing count over the course of a line chart.

The data looks something like this:

Asset IDAssigned Date
1237/12/21
1247/12/21
1257/13/21
1267/14/21

 

I want the data in the chart to show like this:

  • 7/12/21: 2
  • 7/13/21: 3
  • 7/13/21: 4

Essentially, after each date from the start, the chart adds the previous dates, and charts the total. 

Thanks in advance. 

Labels (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@jzwulf 

Can you please try this?

YOUR_SEARCH
| streamstats count 
| eventstats max(count) as m by Assigned_Date | where count=m
| table Assigned_Date count

 

My Sample Search :

| makeresults | eval _raw = "Asset ID	Assigned Date
123	7/12/21
124	7/12/21
125	7/13/21
1254	7/13/21
126	7/14/21"| multikv forceheader=1
| table Asset_ID Assigned_Date
| rename comment as "Upto Now is sample data only"
| streamstats count 
| eventstats max(count) as m by Assigned_Date | where count=m
| table Assigned_Date count


 

Thanks
KV
▄︻̷̿┻̿═━一   ?

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats dc(AssetID) by AssignedDate
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@jzwulf 

Can you please try this?

YOUR_SEARCH
| streamstats count 
| eventstats max(count) as m by Assigned_Date | where count=m
| table Assigned_Date count

 

My Sample Search :

| makeresults | eval _raw = "Asset ID	Assigned Date
123	7/12/21
124	7/12/21
125	7/13/21
1254	7/13/21
126	7/14/21"| multikv forceheader=1
| table Asset_ID Assigned_Date
| rename comment as "Upto Now is sample data only"
| streamstats count 
| eventstats max(count) as m by Assigned_Date | where count=m
| table Assigned_Date count


 

Thanks
KV
▄︻̷̿┻̿═━一   ?

If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.

jzwulf
Engager

Changed it a bit to fit our actual fields, but this got us there! Thanks a bunch!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...