<?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: Calculate percentage increase/reduction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-increase-reduction/m-p/536571#M151723</link>
    <description>&lt;P&gt;Thank you kindly!&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jan 2021 19:43:09 GMT</pubDate>
    <dc:creator>superisk</dc:creator>
    <dc:date>2021-01-20T19:43:09Z</dc:date>
    <item>
      <title>Calculate percentage increase/reduction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-increase-reduction/m-p/536556#M151716</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have calculated my Total Escalations per Quarter using stats count and I would like to include another field to calculate the percentage increase/decrease of Total Escalations per Quarter.&lt;/P&gt;&lt;P&gt;My query -&lt;/P&gt;&lt;P&gt;| inputlookup Case_Database_v2.csv&lt;BR /&gt;| rename "Case Number" AS Case_Number&lt;BR /&gt;| search Role=Support Squad=*CMS*&lt;BR /&gt;| lookup EAS_Escalations_v1.csv "Case Number" AS Case_Number OUTPUTNEW "Case Number"&lt;BR /&gt;| rename "Case Number" AS EAS_Case_Number&lt;BR /&gt;| eventstats dc(Case_Number) as CaseCount by Quarter&lt;BR /&gt;| stats count(EAS_Case_Number) as Total_Escalations by Quarter, CaseCount&lt;BR /&gt;| eval EAS_Escalation(Percentage)=round(Distinct_Escalations/CaseCount*100,2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this shows -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="48px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="40px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="40px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="48px"&gt;Quarter&lt;/TD&gt;&lt;TD width="40px"&gt;CaseCount&lt;/TD&gt;&lt;TD width="40px"&gt;Total Escalations&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="48px"&gt;Qtr 1&lt;/TD&gt;&lt;TD width="40px"&gt;799&lt;/TD&gt;&lt;TD width="40px"&gt;315&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="48px"&gt;Qtr 2&lt;/TD&gt;&lt;TD width="40px"&gt;889&lt;/TD&gt;&lt;TD width="40px"&gt;368&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="48px"&gt;Qtr 3&lt;/TD&gt;&lt;TD width="40px"&gt;798&lt;/TD&gt;&lt;TD width="40px"&gt;287&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="48px"&gt;Qtr 4&lt;/TD&gt;&lt;TD width="40px"&gt;777&lt;/TD&gt;&lt;TD width="40px"&gt;220&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to calculate the percentage reduction per quarter, for example,&amp;nbsp; Qtr 4 Total Escalations of 220 is a 13.5% reduction on the 287 escalations from Qtr 3.&lt;/P&gt;&lt;P&gt;Any help is much appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 17:25:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-increase-reduction/m-p/536556#M151716</guid>
      <dc:creator>superisk</dc:creator>
      <dc:date>2021-01-20T17:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage increase/reduction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-increase-reduction/m-p/536564#M151721</link>
      <description>&lt;P&gt;Streamstats should do it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup Case_Database_v2.csv
| rename "Case Number" AS Case_Number
| search Role=Support Squad=*CMS*
| lookup EAS_Escalations_v1.csv "Case Number" AS Case_Number OUTPUTNEW "Case Number"
| rename "Case Number" AS EAS_Case_Number
| eventstats dc(Case_Number) as CaseCount by Quarter
| stats count(EAS_Case_Number) as Total_Escalations by Quarter, CaseCount
| eval EAS_Escalation(Percentage)=round(Distinct_Escalations/CaseCount*100,2)
| streamstats window=2 range(Total_Escalations) as Diff&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 20 Jan 2021 18:24:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-increase-reduction/m-p/536564#M151721</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-20T18:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage increase/reduction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-increase-reduction/m-p/536571#M151723</link>
      <description>&lt;P&gt;Thank you kindly!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 19:43:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-increase-reduction/m-p/536571#M151723</guid>
      <dc:creator>superisk</dc:creator>
      <dc:date>2021-01-20T19:43:09Z</dc:date>
    </item>
  </channel>
</rss>

