<?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 get statistical values for different fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-statistical-values-for-different-fields/m-p/700546#M237700</link>
    <description>&lt;P&gt;Do you mean to use your "base search" and then filter based on profile for each panel? For example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where profile="Dev"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2024 13:32:43 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-09-30T13:32:43Z</dc:date>
    <item>
      <title>how to get statistical values for different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-statistical-values-for-different-fields/m-p/700535#M237697</link>
      <description>&lt;P&gt;I have to create a base search for a dashboard and I am kinda stuck. Any help would be appreciated.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=service msg.message="*uri=/v1/payment-options*" eHttpMethodType="GET"
| fields index, msg.springProfile,msg.transactionId,eHttpStatusCode,eHttpMethodType,eClientId,eURI
| dedup msg.transactionId
| rename msg.springProfile as springProfile
| eval profile = case(like(springProfile, "%dev%"), "DEV",
           like(springProfile, "%qa%"), "QA",
           like(springProfile, "%uat%"), "UAT")
           
| eval request= case(like(eURI, "%/v1/payment-options%"), "PaymentOptions",
                       like(eURI, "%/v1/account%"), "AccountTransalation")
                               
| stats 
count as "TotalRequests",
count(eval(eHttpStatusCode=201 or eHttpStatusCode=204 or eHttpStatusCode=200)) as "TotalSuccessfulRequests",
count(eval(eHttpStatusCode=400)) as "Total400Faliures", 
count(eval(eHttpStatusCode=422)) as "Total422Faliures", 
count(eval(eHttpStatusCode=404)) as "Total404Faliures",
count(eval(eHttpStatusCode=500)) as "Total500Faliures", by profile, eClientId&lt;/LI-CODE&gt;
&lt;P&gt;Now that I want to include the stats in the basesearch else my values/events&amp;nbsp; would be truncated. My problem is I need to also count&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| stats
count as "TotalRequests",
count(eval(eHttpStatusCode=201 or eHttpStatusCode=204 or eHttpStatusCode=200)) as "TotalSuccessfulRequests"&lt;/LI-CODE&gt;
&lt;P&gt;by request&amp;nbsp; for each of the profile such as Dev, QA,UAT to display in 3 different panels.&lt;/P&gt;
&lt;P&gt;How to incorparate this in the above basesearch&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 14:16:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-statistical-values-for-different-fields/m-p/700535#M237697</guid>
      <dc:creator>varsh_6_8_6</dc:creator>
      <dc:date>2024-09-30T14:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to get statistical values for different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-statistical-values-for-different-fields/m-p/700546#M237700</link>
      <description>&lt;P&gt;Do you mean to use your "base search" and then filter based on profile for each panel? For example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where profile="Dev"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 13:32:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-statistical-values-for-different-fields/m-p/700546#M237700</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-09-30T13:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to get statistical values for different fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-get-statistical-values-for-different-fields/m-p/700617#M237713</link>
      <description>&lt;P&gt;You need to go back to the four golden rules of asking an answerable analytical question that I call 4 Commandments:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Illustrate data input (in raw text, anonymize as needed), whether they are raw events or output from a search that volunteers here do not have to look at.&lt;/LI&gt;&lt;LI&gt;Illustrate the desired output from illustrated data.&lt;/LI&gt;&lt;LI&gt;Explain the logic between illustrated data and desired output&amp;nbsp;&lt;EM&gt;without&lt;/EM&gt;&amp;nbsp;SPL.&lt;/LI&gt;&lt;LI&gt;If you also illustrate attempted SPL, illustrate actual output and compare with desired output, explain why they look different&amp;nbsp;&lt;U&gt;to you&lt;/U&gt;&amp;nbsp;if that is not painfully obvious.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 01 Oct 2024 04:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-get-statistical-values-for-different-fields/m-p/700617#M237713</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-10-01T04:25:25Z</dc:date>
    </item>
  </channel>
</rss>

