<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to table/chart over a period of time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494037#M137755</link>
    <description>&lt;P&gt;When I move those times (all_min_time) to my actual search.. they are all the same.&lt;/P&gt;

&lt;P&gt;I dont think there is an easy solution. (although it seems there should be).  &lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:09:33 GMT</pubDate>
    <dc:creator>clintla</dc:creator>
    <dc:date>2020-09-30T03:09:33Z</dc:date>
    <item>
      <title>How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494016#M137734</link>
      <description>&lt;P&gt;trying to calculate groupings of VMs capacity growth over time but a chart or table looks to be the best answer if you need to report on 100 VMs. &lt;/P&gt;

&lt;P&gt;In a simplified data set per below&lt;BR /&gt;
Date ,Name,Capacit Used&lt;BR /&gt;
5/1/2019, VM1,100&lt;BR /&gt;
5/1/2019, VM2,100&lt;BR /&gt;
5/1/2019, VM4,450&lt;BR /&gt;
6/1/2019, VM1,100&lt;BR /&gt;
6/1/2019, VM2,140&lt;BR /&gt;
6/1/2019, VM4,450&lt;BR /&gt;
7/1/2019, VM1,105&lt;BR /&gt;
7/1/2019, VM2,200&lt;BR /&gt;
8/1/2019, VM1,110&lt;BR /&gt;
8/1/2019, VM2,200&lt;BR /&gt;
9/1/2019, VM1,110&lt;BR /&gt;
9/1/2019, VM2,200&lt;BR /&gt;
10/1/2019,VM1,110&lt;BR /&gt;
10/1/2019,VM2,200&lt;BR /&gt;
10/1/2019,VM3,100&lt;BR /&gt;
11/1/2019,VM1,110&lt;BR /&gt;
11/1/2019,VM2,200&lt;BR /&gt;
11/1/2019,VM3,200&lt;/P&gt;

&lt;P&gt;How can you search it so that if you search for 7/1/2019 through 11/1/2019 that the result would be tabled as&lt;/P&gt;

&lt;P&gt;VM1 5GB&lt;BR /&gt;
VM2 0GB&lt;BR /&gt;
VM3 200GB&lt;/P&gt;

&lt;P&gt;So this almost needs to be like a delta except that its clobbered by VMs that are not in the beginning or ending of the time range. &lt;/P&gt;

&lt;P&gt;If a VM is created in the time range then its starting capacity should be 0&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 20:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494016#M137734</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2019-11-26T20:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494017#M137735</link>
      <description>&lt;P&gt;If you extracted the fields, try to sum the capacity over the period, using a &lt;STRONG&gt;stats&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;mysearch | stats sum(capacity_used) by Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to see the usage evolution (not the sum of usage), timechart would be the best too but when using timechart and chart, the &lt;STRONG&gt;top 10 series are displayed only&lt;/STRONG&gt;, you need to add a higher limit if you have 100 Vms&lt;/P&gt;

&lt;P&gt;But the UI and graphs may not be able to show them.&lt;/P&gt;

&lt;P&gt;Example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    mysearch | timechart span=1d max(capacity_used) AS totalUsage by Name limit=100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I would recommend to use a stats instead to build a table.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  mysearch | bucket _time span=1d | stats max(capacity_used) AS totalUsageby _time Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 20:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494017#M137735</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2019-11-26T20:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494018#M137736</link>
      <description>&lt;P&gt;I've tried a lot of variations but I need to figure out how to take the beginning time of capacity_used and subtract the ending time of capacity_used&lt;/P&gt;

&lt;P&gt;Stuff like stats.. just adds up some capacity. &lt;/P&gt;

&lt;P&gt;I was doing earliest(capacity_used) minus latest(capacity_used) but that gets clobbered by VM's that were not present either at the beginning or end of the time range.. like VM3 in my example&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:08:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494018#M137736</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2020-09-30T03:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494019#M137737</link>
      <description>&lt;P&gt;if you have a period and want to measure the delta. try the streamstats.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    | bucket _time span=1d | stats max(capacity_used) AS daily_usage by _time Name| streamstats first(daily_usage) AS first_value last(daily_usage) As last_value by Name  window=2| eval delta=last_value - first_value
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 22:01:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494019#M137737</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2019-11-26T22:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494020#M137738</link>
      <description>&lt;P&gt;Like this (not sure about the units, though):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval _raw="Date,Name,Capacity Used
5/1/2019,VM1,100
5/1/2019,VM2,100
5/1/2019,VM4,450
6/1/2019,VM1,100
6/1/2019,VM2,140
6/1/2019,VM4,450
7/1/2019,VM1,105
7/1/2019,VM2,200
8/1/2019,VM1,110
8/1/2019,VM2,200
9/1/2019,VM1,110
9/1/2019,VM2,200
10/1/2019,VM1,110
10/1/2019,VM2,200
10/1/2019,VM3,100
11/1/2019,VM1,110
11/1/2019,VM2,200
11/1/2019,VM3,200"
| multikv forceheader=1

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution"

| eval _time = strptime(Date, "%m/%d/%Y")
| where _time &amp;gt;= strptime("7/1/2019", "%m/%d/%Y") AND _time &amp;lt;= strptime("11/1/2019", "%m/%d/%Y")
| stats sum(Capacity_Used) AS Capacity_Used BY Name
| eval Capacity_Used = Capacity_Used . "GB"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Nov 2019 22:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494020#M137738</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-26T22:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494021#M137739</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="Date ,Name,Capacit_Used
5/1/2019, VM1,100
5/1/2019, VM2,100
5/1/2019, VM4,450
6/1/2019, VM1,100
6/1/2019, VM2,140
6/1/2019, VM4,450
7/1/2019, VM1,105
7/1/2019, VM2,200
8/1/2019, VM1,110
8/1/2019, VM2,200
9/1/2019, VM1,110
9/1/2019, VM2,200
10/1/2019,VM1,110
10/1/2019,VM2,200
10/1/2019,VM3,100
11/1/2019,VM1,110
11/1/2019,VM2,200
11/1/2019,VM3,200"
| rex mode=sed "s/ //g"
| multikv
| table Date,Name,Capacit_Used
`comment("this is sample data")`
| eval _time=strptime(Date,"%m/%d/%Y") 
`comment("Adjust the period here if necessary")`
| stats earliest(_time) as first_time earliest(Capacit_Used) as first_value latest(_time) as last_time latest(Capacit_Used) as last_value
 range(Capacit_Used) as result by Name
| foreach *_time 
    [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = strftime(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,"%m/%d/%Y") ]
| eval result = result . "GB"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, @clintla&lt;BR /&gt;
Please evaluate the previous answer.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 12:27:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494021#M137739</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-11-27T12:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494022#M137740</link>
      <description>&lt;P&gt;Output from above&lt;BR /&gt;
VM1 545GB&lt;BR /&gt;
VM2 1000GB&lt;BR /&gt;
VM3 300GB&lt;/P&gt;

&lt;P&gt;This looks like its just adding up all the daily capacities reported. &lt;/P&gt;

&lt;P&gt;Trying to look over any search &amp;amp; find a start/end time &amp;amp; track the growth.  My example below was just from july to nov. havent found a way to make it work yet. &lt;/P&gt;

&lt;P&gt;VM1 5GB&lt;BR /&gt;
VM2 0GB&lt;BR /&gt;
VM3 200GB&lt;/P&gt;

&lt;P&gt;Think there is an easy way to just be able to pick any time frame &amp;amp; then track the growth of groups of VMs?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 14:17:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494022#M137740</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2019-11-27T14:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494023#M137741</link>
      <description>&lt;P&gt;I like the idea but still is clobbered by if a VM is not in the start or end of a selected time frame. &lt;/P&gt;

&lt;P&gt;I was using earliest &amp;amp; latest which works great if a VM is present at the start and end of a selected time frame. &lt;/P&gt;

&lt;P&gt;If a VM is added in the middle of a selected time frame &amp;amp; its 500GB then its earliest is 500GB. (should be 0) which makes the growth calculation inaccurate. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 14:20:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494023#M137741</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2019-11-27T14:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494024#M137742</link>
      <description>&lt;P&gt;This is running into the same problem I was having &lt;BR /&gt;
Name    first_time  first_value last_time   last_value  result&lt;BR /&gt;
VM1 05/01/2019  100 11/01/2019  110 10GB&lt;BR /&gt;
VM2 05/01/2019  100 11/01/2019  200 100GB&lt;BR /&gt;
VM3 10/01/2019  100 11/01/2019  200 100GB&lt;BR /&gt;
VM4 05/01/2019  450 06/01/2019  450 0GB&lt;/P&gt;

&lt;P&gt;Per the stats command- &lt;BR /&gt;
| stats earliest(_time) as first_time &lt;STRONG&gt;earliest(Capacit_Used)&lt;/STRONG&gt; as first_value latest(_time) as last_time &lt;STRONG&gt;latest(Capacit_Used)&lt;/STRONG&gt; as last_value&lt;BR /&gt;
  range(Capacit_Used) as result by Name&lt;/P&gt;

&lt;P&gt;earliest &amp;amp; latest clobber those VMs that were deleted or added in a time range. &lt;BR /&gt;
for VM4- it should not show up in July to Nov but if it was in a time selection- it should read -450 (due to it was deleted)&lt;/P&gt;

&lt;P&gt;This does give me some ideas to try though so thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:09:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494024#M137742</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2020-09-30T03:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494025#M137743</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="Date,Name,Capacity Used
5/1/2019,VM1,100
5/1/2019,VM2,100
5/1/2019,VM4,450
6/1/2019,VM1,100
6/1/2019,VM2,140
6/1/2019,VM4,450
7/1/2019,VM1,105
7/1/2019,VM2,200
8/1/2019,VM1,110
8/1/2019,VM2,200
9/1/2019,VM1,110
9/1/2019,VM2,200
10/1/2019,VM1,110
10/1/2019,VM2,200
10/1/2019,VM3,100
11/1/2019,VM1,110
11/1/2019,VM2,200
11/1/2019,VM3,200"
| multikv forceheader=1
| eval _time = strptime(Date, "%m/%d/%Y")
| sort 0 - _time

 | rename COMMENT AS "Everything above generates sample event data; everything below is your solution"

 | eval _time = strptime(Date, "%m/%d/%Y")
 | where _time &amp;gt;= strptime("7/1/2019", "%m/%d/%Y") AND _time &amp;lt;= strptime("11/1/2019", "%m/%d/%Y")
 | stats range(Capacity_Used) AS option1 min(Capacity_Used) AS min max(Capacity_Used) AS max first(Capacity_Used) AS newest last(Capacity_Used) AS oldest BY Name
 | eval option2 = max - min, option3 = newest - oldest
 | foreach option* [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; . "GB" ]
 | table Name option* *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 16:56:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494025#M137743</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-27T16:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494026#M137744</link>
      <description>&lt;P&gt;Got it.  See my new answer.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 16:57:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494026#M137744</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-27T16:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494027#M137745</link>
      <description>&lt;P&gt;Again for  7/1/2019 through 11/1/2019 that the result would be tabled as&lt;/P&gt;

&lt;P&gt;VM1 5GB&lt;BR /&gt;
VM2 0GB&lt;BR /&gt;
VM3 200GB&lt;/P&gt;

&lt;P&gt;(this is the actual growth)&lt;/P&gt;

&lt;P&gt;If the VM doesnt exist at the beginning of a selected time frame.. it should be 0. &lt;/P&gt;

&lt;P&gt;your results seem to be tied to min/max or earliest/latest but if the VM is not in the beginning or end of the range.. should start or end at 0 respectively. &lt;/P&gt;

&lt;P&gt;Name    option1 option2 eval option3    max min newest  oldest&lt;BR /&gt;
VM1 5GB         5GB           5 110 105 110 105&lt;BR /&gt;
VM2 0GB         0GB           0 200 200 200 200&lt;BR /&gt;
VM3 100GB   100GB   100 200 100 200 100&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 17:14:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494027#M137745</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2019-11-27T17:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494028#M137746</link>
      <description>&lt;P&gt;should there be a fillnul &amp;amp; then add in a token for  TimeRange.earliest=-30d  ?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 17:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494028#M137746</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2019-11-27T17:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494029#M137747</link>
      <description>&lt;P&gt;Maybe a better example is just this. &lt;/P&gt;

&lt;P&gt;if you had a VM that was created last month at 100GB and you did a search &lt;BR /&gt;
for &lt;STRONG&gt;year to date.&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;your growth would be 100GB. &lt;/P&gt;

&lt;P&gt;if you do any variation of min/max, earliest/latest, range.. you'll show 0GB growth&lt;BR /&gt;
because earliest/latest/max/min/range is all going to show the same value&lt;/P&gt;

&lt;P&gt;but the true growth is 100GB&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 17:30:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494029#M137747</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2019-11-27T17:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494030#M137748</link>
      <description>&lt;P&gt;OK, one more time.  Stand by for new answer...&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 18:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494030#M137748</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-27T18:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494031#M137749</link>
      <description>&lt;P&gt;The problem is that your example doesn't have the use-case that you are complaining about.  In any case, I have modified my answer to accommodate it as such: if there is only 1 event in the results set for any VM &lt;CODE&gt;Name&lt;/CODE&gt;, then the value is listed as the growth:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="Date,Name,Capacity Used
5/1/2019,VM1,100
5/1/2019,VM2,100
5/1/2019,VM4,450
6/1/2019,VM1,100
6/1/2019,VM2,140
6/1/2019,VM4,450
7/1/2019,VM1,105
7/1/2019,VM2,200
8/1/2019,VM1,110
8/1/2019,VM2,200
9/1/2019,VM1,110
9/1/2019,VM2,200
10/1/2019,VM1,110
10/1/2019,VM2,200
10/1/2019,VM3,100
11/1/2019,VM1,110
11/1/2019,VM2,200
11/1/2019,VM3,200" 
| multikv forceheader=1 
| eval _time = strptime(Date, "%m/%d/%Y") 
| sort 0 - _time 

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution" 

| eval _time = strptime(Date, "%m/%d/%Y") 
| where _time &amp;gt;= strptime("7/1/2019", "%m/%d/%Y") AND _time &amp;lt;= strptime("11/1/2019", "%m/%d/%Y") 
| stats count range(Capacity_Used) AS option1 min(Capacity_Used) AS min max(Capacity_Used) AS max first(Capacity_Used) AS newest last(Capacity_Used) AS oldest BY Name 
| eval option2 = max - min, option3 = newest - oldest 
| foreach option* [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = if(count==1, min, &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;) . "GB" ] 
| table Name option* * 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 18:09:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494031#M137749</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-27T18:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494032#M137750</link>
      <description>&lt;P&gt;VM3 is one that is added in the time range &amp;amp; is what the main problem that I've been trying to fix. &lt;/P&gt;

&lt;P&gt;Lemme check this out though &amp;amp; see if I can use it. &lt;/P&gt;

&lt;P&gt;Thanks for the ongoing answers.. it does help in me learning more &amp;amp; being able to try new things&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 18:14:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494032#M137750</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2019-11-27T18:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494033#M137751</link>
      <description>&lt;P&gt;Still, I guess I am not explaining it well enough or there is just not a straight-forward solution for this. &lt;/P&gt;

&lt;P&gt;VM3 is the use case I was describing. It simply comes in during the time range&lt;/P&gt;

&lt;P&gt;The more I look at it, the more I think it needs to be solved w/ a _time solution. &lt;/P&gt;

&lt;P&gt;If a VM is removed from the selected time range.. it also wont work. (like VM4 if you do all-time)&lt;/P&gt;

&lt;P&gt;if you count events, it doesnt work (doesnt tell you to start or end with a 0)&lt;/P&gt;

&lt;P&gt;Anyway.. thanks for the efforts.. I will continue to plug away at it. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 18:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494033#M137751</guid>
      <dc:creator>clintla</dc:creator>
      <dc:date>2019-11-27T18:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494034#M137752</link>
      <description>&lt;P&gt;OK, I &lt;EM&gt;finally&lt;/EM&gt; get it.  Stand by for one more answer.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 18:32:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494034#M137752</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-27T18:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to table/chart over a period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494035#M137753</link>
      <description>&lt;P&gt;This definitely does what you need but I am unsure if the &lt;CODE&gt;all_min_time&lt;/CODE&gt; calculation needs to go before or after the &lt;CODE&gt;where&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="Date,Name,Capacity Used
5/1/2019,VM1,100
5/1/2019,VM2,100
5/1/2019,VM4,450
6/1/2019,VM1,100
6/1/2019,VM2,140
6/1/2019,VM4,450
7/1/2019,VM1,105
7/1/2019,VM2,200
8/1/2019,VM1,110
8/1/2019,VM2,200
9/1/2019,VM1,110
9/1/2019,VM2,200
10/1/2019,VM1,110
10/1/2019,VM2,200
10/1/2019,VM3,100
11/1/2019,VM1,110
11/1/2019,VM2,200
11/1/2019,VM3,200" 
| multikv forceheader=1 
| eval _time = strptime(Date, "%m/%d/%Y") 
| sort 0 - _time 

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution" 

| eval _time = strptime(Date, "%m/%d/%Y") 
| where _time &amp;gt;= strptime("7/1/2019", "%m/%d/%Y") AND _time &amp;lt;= strptime("11/1/2019", "%m/%d/%Y") 
| eventstats min(_time) AS all_min_time
| stats count first(all_min_time) AS all_min_time min(_time) AS min_time range(Capacity_Used) AS option1 min(Capacity_Used) AS min max(Capacity_Used) AS max first(Capacity_Used) AS newest last(Capacity_Used) AS oldest BY Name 
| eval first = if(my_min_time==all_min_time, first, 0)
| eval option2 = max - min, option3 = newest - oldest 
| foreach option* [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; . "GB" ]
| table Name option* * 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 18:39:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-chart-over-a-period-of-time/m-p/494035#M137753</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-11-27T18:39:03Z</dc:date>
    </item>
  </channel>
</rss>

