<?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 Need help selecting values from two events and calculating percentage change in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/514484#M144399</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;First of all, thanks for any help you may be able to give me. I would appreciate some help with a problem I'm having. I uploaded a csv file to my Splunk that contains only Date/Value pairs. Below is an example of the data.&lt;/P&gt;&lt;P&gt;I would like to select the Value of 2020-07-31 and the value of 2020-06-30 and calculate the percentage change over that month. Additionally, I'd like to be able to calculate the percentage change but I think I may be able to get that on my own if I can get a hand with the first part.&lt;/P&gt;&lt;P&gt;I'd share my queries so far but I wasted the whole day yesterday trying to get this to work with little useful progress.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled picture.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10319i052A5849C2316931/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture.png" alt="Untitled picture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Aug 2020 16:00:58 GMT</pubDate>
    <dc:creator>jmattheson</dc:creator>
    <dc:date>2020-08-17T16:00:58Z</dc:date>
    <item>
      <title>Need help selecting values from two events and calculating percentage change</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/514484#M144399</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;First of all, thanks for any help you may be able to give me. I would appreciate some help with a problem I'm having. I uploaded a csv file to my Splunk that contains only Date/Value pairs. Below is an example of the data.&lt;/P&gt;&lt;P&gt;I would like to select the Value of 2020-07-31 and the value of 2020-06-30 and calculate the percentage change over that month. Additionally, I'd like to be able to calculate the percentage change but I think I may be able to get that on my own if I can get a hand with the first part.&lt;/P&gt;&lt;P&gt;I'd share my queries so far but I wasted the whole day yesterday trying to get this to work with little useful progress.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled picture.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10319i052A5849C2316931/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled picture.png" alt="Untitled picture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Aug 2020 16:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/514484#M144399</guid>
      <dc:creator>jmattheson</dc:creator>
      <dc:date>2020-08-17T16:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help selecting values from two events and calculating percentage change</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/514885#M144535</link>
      <description>&lt;P&gt;Below query shall give you output of your first question. You need to use where clause in your query. Do let me&amp;nbsp; know if you need more help. Hit a like answer was helpful.&lt;BR /&gt;&lt;BR /&gt;index="blsi_cpi"|table Date, Value|where Date="2020-07-31" or Date="2020-06-30"&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 09:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/514885#M144535</guid>
      <dc:creator>vikasjha001</dc:creator>
      <dc:date>2020-08-19T09:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need help selecting values from two events and calculating percentage change</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/514919#M144547</link>
      <description>&lt;LI-CODE lang="markup"&gt;| gentimes start=01/31/2020 
| eval _time=starttime
| timechart span=1month count
| eval _time=relative_time(_time,"-1d@d")
| reverse
| eval Value=100
| streamstats count
| eval Value=Value+count*45
| fields - count
| rename COMMENT as "this is sample"

| rename COMMENT as "this is logic"
| reverse
| autoregress Value as last_Value
| reverse
| eval perc=round(Value/last_Value * 100,2)&lt;/LI-CODE&gt;&lt;P&gt;You didn't provide a calculation method, so I'm not sure.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2020 11:29:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/514919#M144547</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-19T11:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need help selecting values from two events and calculating percentage change</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/515284#M144663</link>
      <description>&lt;P&gt;So, I decided to fix how I ingested the data in the first place to make the Date column the timestamp. I added TIMESTAMP_FIELDS and FIELD_FORMAT to the conf file. This greatly simplified my queries. This is probably the right solution for me instead of doing something wrong and then making a convoluted workaround. Thanks for the suggestion.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 18:59:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-help-selecting-values-from-two-events-and-calculating/m-p/515284#M144663</guid>
      <dc:creator>jmattheson</dc:creator>
      <dc:date>2020-08-20T18:59:03Z</dc:date>
    </item>
  </channel>
</rss>

