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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...