<?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: adding value output rows from a stats table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/adding-value-output-rows-from-a-stats-table/m-p/568633#M198167</link>
    <description>&lt;P&gt;appendpipe sounds great but it won't work that straightforward with multivalued fields.&lt;/P&gt;&lt;P&gt;I can't seem to be able to do a "dynamic addressing" of multivalued fields so I could mvfind a position in one list and find a value in another one (something like field.(mvfind(another_field,"value")) - it doesn't work).&lt;/P&gt;&lt;P&gt;Furthermore, expanding mvfields with mvexpand - well, you can't do it "pairwise". You could do mvzip to produce pairs but it's getting even more ugly and you still have filtering ahead of you. Ugly as hell.&lt;/P&gt;&lt;P&gt;So I'd rather skip the "stats list" from the original search. Or at least moved it way to the end - until all the calculations are complete.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Sep 2021 23:22:55 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-09-27T23:22:55Z</dc:date>
    <item>
      <title>adding value output rows from a stats table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-value-output-rows-from-a-stats-table/m-p/568584#M198158</link>
      <description>&lt;P&gt;I have the following search.&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=main_index sourcetype="hec:google" operationName=createMobileAuthenticationOutcome direction=response source="customers-mobile-authentications-v1"&lt;BR /&gt;| dedup correlationId&lt;BR /&gt;| stats count by eventData.log{}.downstreamRequestAdditionalLog.request.applicationEntryType eventData.log{}.downstreamRequestAdditionalLog.request.authenticationOutcome&lt;BR /&gt;| sort -count&lt;BR /&gt;| eventstats sum(count) as tot by eventData.log{}.downstreamRequestAdditionalLog.request.applicationEntryType&lt;BR /&gt;| eval perc = round(count/tot*100,1)&lt;BR /&gt;| stats list(eventData.log{}.downstreamRequestAdditionalLog.request.authenticationOutcome) as "OutCome Request Details" list(count) as Count, list(perc) as "% per Auth Type" by eventData.log{}.downstreamRequestAdditionalLog.request.applicationEntryType&lt;BR /&gt;| appendpipe&lt;BR /&gt;[ stats sum(Count) as Count, sum("% per Auth Type") as "% per Auth Type" by eventData.log{}.downstreamRequestAdditionalLog.request.applicationEntryType&lt;BR /&gt;| eval "OutCome Request Details" = "Total Request"]&lt;BR /&gt;| sort eventData.log{}.downstreamRequestAdditionalLog.request.applicationEntryType&lt;BR /&gt;| rename eventData.log{}.downstreamRequestAdditionalLog.request.applicationEntryType as "Auth Type"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;which shows this table. But....&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3DS MI Report Stats Table.JPG" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16171i0BFEB05E2D1A914D/image-size/large?v=v2&amp;amp;px=999" role="button" title="3DS MI Report Stats Table.JPG" alt="3DS MI Report Stats Table.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What I want to do is add another row for the total number of directOpenApp.Completed and pushNotifications.Completed&lt;/P&gt;&lt;P&gt;I've tried addtotals and can't get my head around appendcols.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;r&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 16:57:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-value-output-rows-from-a-stats-table/m-p/568584#M198158</guid>
      <dc:creator>rhallinan</dc:creator>
      <dc:date>2021-09-27T16:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: adding value output rows from a stats table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-value-output-rows-from-a-stats-table/m-p/568626#M198164</link>
      <description>&lt;P&gt;It sounds like you're wanting to add a subtotal column.&amp;nbsp; If so, see the examples for the &lt;FONT face="courier new,courier"&gt;appendpipe&lt;/FONT&gt; command (&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.2/SearchReference/Appendpipe#Examples" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.2/SearchReference/Appendpipe#Examples&lt;/A&gt;) for how to that.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 21:06:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-value-output-rows-from-a-stats-table/m-p/568626#M198164</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-09-27T21:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: adding value output rows from a stats table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/adding-value-output-rows-from-a-stats-table/m-p/568633#M198167</link>
      <description>&lt;P&gt;appendpipe sounds great but it won't work that straightforward with multivalued fields.&lt;/P&gt;&lt;P&gt;I can't seem to be able to do a "dynamic addressing" of multivalued fields so I could mvfind a position in one list and find a value in another one (something like field.(mvfind(another_field,"value")) - it doesn't work).&lt;/P&gt;&lt;P&gt;Furthermore, expanding mvfields with mvexpand - well, you can't do it "pairwise". You could do mvzip to produce pairs but it's getting even more ugly and you still have filtering ahead of you. Ugly as hell.&lt;/P&gt;&lt;P&gt;So I'd rather skip the "stats list" from the original search. Or at least moved it way to the end - until all the calculations are complete.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 23:22:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/adding-value-output-rows-from-a-stats-table/m-p/568633#M198167</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-27T23:22:55Z</dc:date>
    </item>
  </channel>
</rss>

