<?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: Splunk Search for Total Values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503721#M140625</link>
    <description>&lt;P&gt;Thank you, &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/81823"&gt;@bmunson_splunk&lt;/a&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jun 2020 12:15:24 GMT</pubDate>
    <dc:creator>madhav_dholakia</dc:creator>
    <dc:date>2020-06-10T12:15:24Z</dc:date>
    <item>
      <title>Splunk Search for Total Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503669#M140612</link>
      <description>&lt;P&gt;Hello There,&lt;/P&gt;&lt;P&gt;I have got a search result as given below (without the highlighted row, i.e. Total):&lt;/P&gt;&lt;TABLE border="1" width="102.19555943167241%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;Analyst&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;Month&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;Total Count&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;SLA (%)&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;Working Days&lt;/TD&gt;&lt;TD width="10%"&gt;Daily Count (Total Count / Working Days)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;ABC&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;May-20&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;68&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;97&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;18&lt;/TD&gt;&lt;TD width="10%"&gt;3.77&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;DEF&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;May-20&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;45&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;100&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;20&lt;/TD&gt;&lt;TD width="10%"&gt;2.25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;GHI&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;May-20&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;25&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;94&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;15&lt;/TD&gt;&lt;TD width="10%"&gt;1.66&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;JKL&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;May-20&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;86&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;98&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;22&lt;/TD&gt;&lt;TD width="10%"&gt;3.91&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;May-20&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;224&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;&lt;STRONG&gt;97.25&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="10%" height="25px"&gt;&lt;STRONG&gt;75&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="10%"&gt;&lt;STRONG&gt;2.97&lt;BR /&gt;&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data for all these columns (except "Working Days") is available through a DB Connect Database live feed. Data for column "Working Days" is stored in a csv lookup file (created through Lookup Editor).&lt;/P&gt;&lt;P&gt;Search which gives me above output (without &lt;STRONG&gt;Total&lt;/STRONG&gt; Values) is something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup TeamDetails.csv 
| addinfo
| eval temp=strftime(info_min_time,"%B-%Y")
| where Month_Year=temp
| table Analyst Month_Year
| join type=left Analyst [search index="idx_test" source="src_test" sourcetype="srctype_test"
| sort -editTime
| dedup id
 | lookup TeamDetails.csv Analyst OUTPUT WorkingDays
 | stats count as TotalCount by Analyst, WorkingDays
 | eval DailyCount=round(TotalCount/WorkingDays,2)
 | table Analyst DailyCount WorkingDays ]
 | join type=left Analyst [search index="idx_test" source="src_test" sourcetype="srctype_test"
| sort -editTime
| dedup id
 | eval inSLACount=if(SLA_Flag="1",1,0)
 | eval outSLACount=if(SLA_Flag="0",1,0)
 | stats sum(inSLACount) as  insideSLA,	 sum(outSLACount) as outsideSLA, count(id) as TotalCount by Analyst
 | eval SLA=round(insideSLA/(TotalCount)*100,2)
 | table Analyst SLA TotalCount ]
 | table Analyst Month_Year TotalCount SLA WorkingDays DailyCount&lt;/LI-CODE&gt;&lt;P&gt;How can I change this search so that I get above given table output (including &lt;STRONG&gt;Total&lt;/STRONG&gt; numbers).&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Madhav&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 06:22:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503669#M140612</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2020-06-10T06:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search for Total Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503671#M140613</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="Analyst	Month	TotalCount	SLA	WorkingDays	DailyCount
ABC	May-20	68	97	18	3.77
DEF	May-20	45	100	20	2.25
GHI	May-20	25	94	15	1.66
JKL	May-20	86	98	22	3.91" 
| multikv forceheader=1 
| table Analyst Month TotalCount SLA WorkingDays DailyCount 
| rename COMMENT as "this is your sample. from here, the logic" 
| appendpipe 
    [| stats values(eval("Total")) as Analyst values(Month) as Month avg(SLA) as SLA avg(DailyCount) as DailyCount sum(TotalCount) as TotalCount sum(WorkingDays) as WorkingDays]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/65114"&gt;@madhav_dholakia&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;why don't you try appendpipe ?&lt;BR /&gt;&lt;BR /&gt;Please Accept and Upvote, If you'd like.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 06:50:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503671#M140613</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-10T06:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search for Total Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503673#M140614</link>
      <description>&lt;P&gt;I would add this append pipe immediately before your table command.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| append [stats values(Month_Year) as Month_Year sum(TotalCount) as TotalCount avg(SLA) as SLA sum(WorkingDays) as WorkingDays avg(DailyCount) as DailyCount | eval Analyst = "Total" ] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 06:52:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503673#M140614</guid>
      <dc:creator>bmunson_splunk</dc:creator>
      <dc:date>2020-06-10T06:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search for Total Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503720#M140624</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt; - works perfectly fine. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 12:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503720#M140624</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2020-06-10T12:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search for Total Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503721#M140625</link>
      <description>&lt;P&gt;Thank you, &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/81823"&gt;@bmunson_splunk&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 12:15:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Search-for-Total-Values/m-p/503721#M140625</guid>
      <dc:creator>madhav_dholakia</dc:creator>
      <dc:date>2020-06-10T12:15:24Z</dc:date>
    </item>
  </channel>
</rss>

