<?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: Return one value from field-B when counting field-A in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703538#M238445</link>
    <description>&lt;P&gt;That worked great! I was trying to use two different 'stats' and could not get both of the values.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!!&lt;/P&gt;</description>
    <pubDate>Mon, 04 Nov 2024 21:53:58 GMT</pubDate>
    <dc:creator>sta_splunk</dc:creator>
    <dc:date>2024-11-04T21:53:58Z</dc:date>
    <item>
      <title>Return one value from field-B when counting field-A</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703522#M238433</link>
      <description>&lt;P&gt;I have data similar to:&lt;/P&gt;&lt;P&gt;Field-A Field-B&lt;BR /&gt;A1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B1&lt;BR /&gt;A1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B2&lt;BR /&gt;A1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B3&lt;BR /&gt;A2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B4&lt;BR /&gt;A3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B5&lt;BR /&gt;A2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B6&lt;/P&gt;&lt;P&gt;Where Field-A will repeat but Field-B is unique values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using | stats count by Field-A to give me the number of occurrences of A1, A2, A3 and am trying to include a single example of Field-B.&amp;nbsp; Something like:&lt;/P&gt;&lt;P&gt;Field-Count-Example&lt;BR /&gt;A1 -- 3 -- B2&lt;BR /&gt;A2 -- 2 -- B6&lt;BR /&gt;A3 -- 1 -- B5&lt;/P&gt;&lt;P&gt;Thank you for any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 20:18:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703522#M238433</guid>
      <dc:creator>sta_splunk</dc:creator>
      <dc:date>2024-11-04T20:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Return one value from field-B when counting field-A</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703533#M238441</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count as Count, first(Field-B) as Example by Field-A&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 04 Nov 2024 21:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703533#M238441</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-11-04T21:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Return one value from field-B when counting field-A</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703538#M238445</link>
      <description>&lt;P&gt;That worked great! I was trying to use two different 'stats' and could not get both of the values.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 21:53:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703538#M238445</guid>
      <dc:creator>sta_splunk</dc:creator>
      <dc:date>2024-11-04T21:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Return one value from field-B when counting field-A</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703547#M238449</link>
      <description>&lt;P&gt;Two separate &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; commands are unlikely to work because they're transforming commands.&amp;nbsp; That means the seconds &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; won't have the same fields to work with as the first one.&amp;nbsp; One alternative is to use &lt;FONT face="courier new,courier"&gt;eventstats&lt;/FONT&gt; before &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt;, but it's unnecessary in this case because a single &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; can do it all.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 01:03:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Return-one-value-from-field-B-when-counting-field-A/m-p/703547#M238449</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-11-05T01:03:06Z</dc:date>
    </item>
  </channel>
</rss>

