<?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 edit my search to calculate a percentage for my timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235347#M69892</link>
    <description>&lt;P&gt;ok thanks.. I'm not getting results.. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2016 17:38:19 GMT</pubDate>
    <dc:creator>k_harini</dc:creator>
    <dc:date>2016-11-22T17:38:19Z</dc:date>
    <item>
      <title>How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235341#M69886</link>
      <description>&lt;P&gt;I have to calculate % of SLA missed over time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;basesearch|dedup ID|EVAL sla_status = case(Status like "Closed MPT Warning%","Closed-MPT Warning",Status like "Closed MPT Exceeded%","Closed-MPT Exceeded",Status like "Closed IRT Exceeded%","Closed-IRT Exceeded",Status like "Closed IRT Warning%","Closed-IRT Warning",Status like "Closed%","Closed") |timechart count as sla_count by sla_status |addtotals| foreach * [eval sla_perc = count * 100 /Total] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not sure why this is not working. Please help&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 14:03:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235341#M69886</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2016-11-22T14:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235342#M69887</link>
      <description>&lt;P&gt;1.) what is the result you get?&lt;BR /&gt;
2.) in your foreach [eval sla_perc = &lt;STRONG&gt;count&lt;/STRONG&gt; 100 /Total]  statement... shouldnt the &lt;STRONG&gt;count&lt;/STRONG&gt; be a &lt;STRONG&gt;sla_count&lt;/STRONG&gt;?&lt;BR /&gt;
Asking because in the timechart you define count as sla_count "|timechart &lt;STRONG&gt;count as sla_count&lt;/STRONG&gt; by sla_status "&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:51:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235342#M69887</guid>
      <dc:creator>PPape</dc:creator>
      <dc:date>2020-09-29T11:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235343#M69888</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;basesearch|dedup ID|EVAL sla_status = case(Status like "Closed MPT Warning%","Closed-MPT Warning",Status like "Closed MPT Exceeded%","Closed-MPT Exceeded",Status like "Closed IRT Exceeded%","Closed-IRT Exceeded",Status like "Closed IRT Warning%","Closed-IRT Warning",Status like "Closed%","Closed") |timechart count as sla_count by sla_status | addtotals| foreach * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;=if(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;==Total, &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;/Total)] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Nov 2016 14:50:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235343#M69888</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-22T14:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235344#M69889</link>
      <description>&lt;P&gt;I get results till Total.. Not getting %..  yes.. it was sla_count..  First did with count and then tried with alias too.. Not working&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 17:24:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235344#M69889</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2016-11-22T17:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235345#M69890</link>
      <description>&lt;P&gt;which field should i compare with Total.. I just need %.. (count/total)*100 for all values...&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 17:25:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235345#M69890</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2016-11-22T17:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235346#M69891</link>
      <description>&lt;P&gt;&lt;CODE&gt;&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;&lt;/CODE&gt; represents each field in the "table". In this case, it will exclude fieldName=Total. Are you not seeing correct results?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 17:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235346#M69891</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-22T17:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235347#M69892</link>
      <description>&lt;P&gt;ok thanks.. I'm not getting results.. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 17:38:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235347#M69892</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2016-11-22T17:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235348#M69893</link>
      <description>&lt;P&gt;If the field names are numerical, enclose &lt;CODE&gt;&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;&lt;/CODE&gt; within single quotes - &lt;CODE&gt;'&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 18:18:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235348#M69893</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-22T18:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to calculate a percentage for my timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235349#M69894</link>
      <description>&lt;P&gt;Thank you so much.. it worked.. &lt;CODE&gt;foreach * [eval &amp;lt;&amp;gt;=round('&amp;lt;&amp;gt;'*100/Total]&lt;/CODE&gt;.. I was struggling with this for such a long time..&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2016 18:56:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-calculate-a-percentage-for-my-timechart/m-p/235349#M69894</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2016-11-22T18:56:10Z</dc:date>
    </item>
  </channel>
</rss>

