<?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: Trying to get month over month with detail. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418794#M120405</link>
    <description>&lt;P&gt;It’s | eval Total= round(Total,2)&lt;/P&gt;

&lt;P&gt;My bad I didn’t realize while typing .&lt;/P&gt;</description>
    <pubDate>Sun, 20 Jan 2019 04:34:42 GMT</pubDate>
    <dc:creator>Vijeta</dc:creator>
    <dc:date>2019-01-20T04:34:42Z</dc:date>
    <item>
      <title>Trying to get month over month with detail.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418789#M120400</link>
      <description>&lt;P&gt;My current working and pretty one is this:  &lt;/P&gt;

&lt;P&gt;|eval Owner=ProductName | stats  sum(Cost) as Total by TimePeriod, Owner | eval Total=round(Total, 2)  |chart values(Total) over TimePeriod by Owner&lt;/P&gt;

&lt;P&gt;The above works great for showing my exact spend broken out on product per day (I have that as week to date), but I'm running around in circles trying to figure out how to get the same data but by month.&lt;/P&gt;

&lt;P&gt;Not quite what I want:&lt;BR /&gt;&lt;BR /&gt;
|eval Owner=ProductName | timechart span=1mon sum(Cost) as Monthly_Cost | eval Monthly_Cost=round(Monthly_Cost, 2)&lt;/P&gt;

&lt;P&gt;So I would like the top one but per month, vs per day.. I am just struggling trying to figure it out.  The detail of the first one is a real good visual on if something is going a bit nuts. And being able to see the same breakout per month, would allow to see trending not just by month but by ProductName.&lt;/P&gt;

&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:52:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418789#M120400</guid>
      <dc:creator>tmblue</dc:creator>
      <dc:date>2020-09-29T22:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get month over month with detail.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418790#M120401</link>
      <description>&lt;P&gt;You can use bin span.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval Owner= ProductName| bin span= 1mon TimePeriod| stats  sum(Cost) as Total by Owner TimePeriod| eval Total=Total(round,2)| chart values(Total) over TimePeriod by Owner 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 20 Jan 2019 03:36:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418790#M120401</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-20T03:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get month over month with detail.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418791#M120402</link>
      <description>&lt;P&gt;Thanks, but getting an error.&lt;/P&gt;

&lt;P&gt;So I fixed the bin command I believe it needs to be used as bin _time span=1mon, when I fix that. It doesn't like my TimePeriod (which is a field (%F) in my data:&lt;/P&gt;

&lt;P&gt;|eval Owner=ProductName| bin _time span=1mon TimePeriod| stats  sum(Cost) as Total by Owner TimePeriod| eval Total=Total(round,2)| chart values(Total) over TimePeriod by Owner &lt;/P&gt;

&lt;P&gt;Error in 'bin' command: Invalid argument: 'TimePeriod'&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jan 2019 03:52:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418791#M120402</guid>
      <dc:creator>tmblue</dc:creator>
      <dc:date>2019-01-20T03:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get month over month with detail.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418792#M120403</link>
      <description>&lt;P&gt;Just make it bin span=1mon _time and do the stats and chart using _time instead of TimePeriod.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jan 2019 03:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418792#M120403</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-20T03:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get month over month with detail.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418793#M120404</link>
      <description>&lt;P&gt;You know I started changing things over to that, but said "well _time has nothing to do with my TimePeriod, so I bailed.. but.. okay. So closer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;If I keep it as is just replacing the TimePeriod with _time, it has a hard time with my total change to 2 decimal points and crys&lt;/P&gt;

&lt;P&gt;|eval Owner=ProductName| bin span=1mon _time | stats  sum(Cost) as Total by Owner _time | eval Total=Total(round,2)| chart values(Total) over _time by Owner &lt;/P&gt;

&lt;P&gt;Error in 'eval' command: The 'total' function is unsupported or undefined.&lt;/P&gt;

&lt;P&gt;Now I remove ; eval Total=Total(round,2) , which I really can't do, numbers are just too long with out it.&lt;/P&gt;

&lt;P&gt;This looks right, other than the 2 decimals and the _time is including hours and offset,&lt;/P&gt;

&lt;P&gt;|eval Owner=ProductName| bin span=1mon _time | stats  sum(Cost) as Total by Owner _time | chart values(Total) over _time by Owner &lt;/P&gt;

&lt;P&gt;Now i see time reference like  2018-10-01T00:00:00.000-7:00 That's a bit long, would like it just to be 2018-10-01 or (%F)&lt;/P&gt;

&lt;P&gt;But it's closer than I've been able to get so far &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jan 2019 04:11:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418793#M120404</guid>
      <dc:creator>tmblue</dc:creator>
      <dc:date>2019-01-20T04:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get month over month with detail.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418794#M120405</link>
      <description>&lt;P&gt;It’s | eval Total= round(Total,2)&lt;/P&gt;

&lt;P&gt;My bad I didn’t realize while typing .&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jan 2019 04:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418794#M120405</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-01-20T04:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to get month over month with detail.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418795#M120406</link>
      <description>&lt;P&gt;HAH a bit of work but I'm dancing, needed to add the eval_time to change the format and your correction on my 2 decimal point fixed that piece. So yes !!!!!&lt;/P&gt;

&lt;P&gt;|eval Owner=ProductName| bin  span=1mon _time | &lt;STRONG&gt;eval _time = strftime(_time,"%F")&lt;/STRONG&gt; | stats  sum(Cost) as Total by Owner _time | eval Total= round(Total,2)| chart values(Total) over _time by Owner &lt;/P&gt;

&lt;P&gt;Thank you for working it through with me, def the right pointers!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:52:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-get-month-over-month-with-detail/m-p/418795#M120406</guid>
      <dc:creator>tmblue</dc:creator>
      <dc:date>2020-09-29T22:52:57Z</dc:date>
    </item>
  </channel>
</rss>

