<?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: stats query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704082#M238612</link>
    <description>&lt;P&gt;It is not so easy to get exactly the layout that you want as each resulting stats event contains a repeat of the information at the techGroupLevel level&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count by techGroupLevel problem_detail
| eventstats sum(count) as total by techGroupLevel&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 11 Nov 2024 12:32:29 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-11-11T12:32:29Z</dc:date>
    <item>
      <title>stats query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704078#M238610</link>
      <description>&lt;P&gt;Morning All&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;appreciate some guidance on a spl i'm working on and just cant get the information i require&lt;/P&gt;&lt;P&gt;my dataset is tickets on our helpdesk . Im looking for the total number of ticket each team has for each different request type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;team is called techGroupLevel&lt;/P&gt;&lt;P&gt;request type is call problem_detail&lt;/P&gt;&lt;P&gt;here's my search so far and it's just note right.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;| table _time id displayClient location_Name problem_detail detail bookmarkableLink status priority techGroupId techGroupLevel tech_Name reportDateUtc lastUpdated closeDate&lt;BR /&gt;| stats values(problem_detail) as problem_detail count(problem_detail) as total by techGroupLevel&lt;BR /&gt;&lt;BR /&gt;under the i'm getting the following&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaulaCom_0-1731324301667.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33434i26739FD2B535A47A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaulaCom_0-1731324301667.png" alt="PaulaCom_0-1731324301667.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can see that the figure returned on total is the combined total for all problem_details for each team&amp;nbsp;&lt;BR /&gt;i'd prefer to see a separate figure for each problem detail and then perhaps a total sum under each team but dont know how to go about this&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;techGroupLevel&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; problem_detail&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sub-Total&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Total&amp;nbsp;&lt;/P&gt;&lt;P&gt;Systems &amp;amp; Network&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Email&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Server&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Shared Drive&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;appreciate some guidance&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paula&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 11:38:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704078#M238610</guid>
      <dc:creator>PaulaCom</dc:creator>
      <dc:date>2024-11-11T11:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: stats query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704082#M238612</link>
      <description>&lt;P&gt;It is not so easy to get exactly the layout that you want as each resulting stats event contains a repeat of the information at the techGroupLevel level&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count by techGroupLevel problem_detail
| eventstats sum(count) as total by techGroupLevel&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Nov 2024 12:32:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704082#M238612</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-11-11T12:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: stats query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704084#M238613</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;BR /&gt;i used the first line and that looks better&lt;BR /&gt;the second line just repeats the total on each line like this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaulaCom_0-1731328534920.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33435i15E475BB68E045B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaulaCom_0-1731328534920.png" alt="PaulaCom_0-1731328534920.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 12:35:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704084#M238613</guid>
      <dc:creator>PaulaCom</dc:creator>
      <dc:date>2024-11-11T12:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: stats query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704086#M238615</link>
      <description>&lt;P&gt;That's as I described it. There are ways to remove this extra information but they are a little involved and may not give you what you need. One of the more simpler ways is to do this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count by techGroupLevel problem_detail
| eventstats sum(count) as total by techGroupLevel
| stats list(problem_detail) as problem_detail list(count) as count values(total) as total by techGroupLevel&lt;/LI-CODE&gt;&lt;P&gt;Note that problem_detail and count are now multivalue fields and you have to visually align the count with the problem detail rather than them being in separate events and therefore in alternating background colours. Btw, total is also technically a multivalue field but since there is only one value per techGroupLevel, this isn't immediately obvious!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 12:47:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704086#M238615</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-11-11T12:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: stats query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704087#M238616</link>
      <description>&lt;P&gt;thank you for explaining &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; much appreciated&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 12:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-query/m-p/704087#M238616</guid>
      <dc:creator>PaulaCom</dc:creator>
      <dc:date>2024-11-11T12:50:03Z</dc:date>
    </item>
  </channel>
</rss>

