<?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: Search by values in field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532520#M150434</link>
    <description>&lt;P&gt;Would you please clarify the requirements?&amp;nbsp; How is the sample input transformed into the sample output?&lt;/P&gt;&lt;P&gt;The text says "top 2 highest" but the example shows 3 results.&lt;/P&gt;&lt;P&gt;When measuring "highest" which column is to be used?&amp;nbsp; It is the raw values in that column or a sum based on some other field?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Dec 2020 19:38:23 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-12-09T19:38:23Z</dc:date>
    <item>
      <title>Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532472#M150427</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the below table, I was to search by field "Core Content" where "Core Content" should take top 2 highest value.&amp;nbsp;&lt;/P&gt;&lt;TABLE width="329"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;Core Content&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;Count&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Status&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Flag&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4268&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;2223&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;N&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Red&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4267&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;1794&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;N&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Yellow&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4266&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;305&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Y&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Yellow&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4265&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;90&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Y&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Red&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4268&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;19&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Y&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Green&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4263&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;63&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;N&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Green&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4262&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;133&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Y&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Red&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4261&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;34&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;N&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Red&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;4260&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;26&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;N&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;Yellow&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="109px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="91px" height="25px"&gt;4768&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="64px" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output I expect is,&lt;/P&gt;&lt;TABLE width="329"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="110"&gt;Core Content&lt;/TD&gt;&lt;TD width="91"&gt;Count&lt;/TD&gt;&lt;TD width="64"&gt;Status&lt;/TD&gt;&lt;TD width="64"&gt;Flag&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="110"&gt;4268&lt;/TD&gt;&lt;TD width="91"&gt;2223&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;Red&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="110"&gt;4267&lt;/TD&gt;&lt;TD width="91"&gt;1794&lt;/TD&gt;&lt;TD&gt;N&lt;/TD&gt;&lt;TD&gt;Yellow&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="110"&gt;4268&lt;/TD&gt;&lt;TD width="91"&gt;19&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;Green&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All other rows I have to take as Outdated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 14:03:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532472#M150427</guid>
      <dc:creator>nivethainspire_</dc:creator>
      <dc:date>2020-12-09T14:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532520#M150434</link>
      <description>&lt;P&gt;Would you please clarify the requirements?&amp;nbsp; How is the sample input transformed into the sample output?&lt;/P&gt;&lt;P&gt;The text says "top 2 highest" but the example shows 3 results.&lt;/P&gt;&lt;P&gt;When measuring "highest" which column is to be used?&amp;nbsp; It is the raw values in that column or a sum based on some other field?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 19:38:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532520#M150434</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-09T19:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532616#M150460</link>
      <description>&lt;P&gt;The Core Content has values ranging 4260 to 4268. I want show details of only top 2 Core Content that is 4268 and 4267. The core content updates often. Tomorrow it may take 4270.&lt;/P&gt;&lt;P&gt;So I want to query for a table where core content should search only top 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 10:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532616#M150460</guid>
      <dc:creator>nivethainspire_</dc:creator>
      <dc:date>2020-12-10T10:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532636#M150466</link>
      <description>&lt;P&gt;Here's one way to do that.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your search
| sort 2 - Count&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 10 Dec 2020 13:33:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/532636#M150466</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-10T13:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533118#M150614</link>
      <description>&lt;P&gt;Basically I want to run the below query&lt;/P&gt;&lt;P&gt;index=s_cnn sourcetype=S_network | fillnull value="00" Com | fillnull value="" | search Status="Reporting" Form!="VP" Form!="VI" | search Form="*" Group="*" Env="*" OS="*" Company="*"&amp;nbsp; "Core Content"="4283.0" OR "Core Content"="4286.0" | sort "Core Content"&lt;/P&gt;&lt;P&gt;Instead of explicitly hardcoding the values for&amp;nbsp;"Core Content", I want them to take the top 2 values of&amp;nbsp;"Core Content"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2020 10:26:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533118#M150614</guid>
      <dc:creator>nivethainspire_</dc:creator>
      <dc:date>2020-12-15T10:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533134#M150628</link>
      <description>&lt;P&gt;Try this query.&amp;nbsp; The main difference is the use of single quotes.&amp;nbsp; In Splunk, double quotes denote a string while single quote denote a field name.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=s_cnn sourcetype=S_network Status="Reporting" Form!="VP" Form!="VI" Form="*" Group="*" Env="*" OS="*" Company="*" ("Core Content"="4283.0" OR "Core Content"="4286.0") 
| fillnull value="00" Com 
| fillnull value="" 
| sort 2 - 'Core Content'&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Dec 2020 13:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533134#M150628</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-15T13:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533290#M150677</link>
      <description>&lt;P&gt;Not working for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=s_cnn sourcetype=S_network Status="Reporting" Form!="VP" Form!="VI" Form="*" Group="*" Env="*" OS="*" Company="*"
| fillnull value="00" Com 
| fillnull value="" |timechart span=1d count("Core Content") by "Core Content"|sort 2 - "Core Content"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its not sorting, I get the below output,&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;TABLE width="677"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="165"&gt;_time&lt;/TD&gt;&lt;TD width="64"&gt;5276&lt;/TD&gt;&lt;TD width="64"&gt;5279&lt;/TD&gt;&lt;TD width="64"&gt;4280&lt;/TD&gt;&lt;TD width="64"&gt;4284&lt;/TD&gt;&lt;TD width="64"&gt;4285&lt;/TD&gt;&lt;TD width="64"&gt;5286&lt;/TD&gt;&lt;TD width="64"&gt;5287&lt;/TD&gt;&lt;TD width="64"&gt;OTHER&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/15/2020&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;26&lt;/TD&gt;&lt;TD&gt;91&lt;/TD&gt;&lt;TD&gt;28&lt;/TD&gt;&lt;TD&gt;1641&lt;/TD&gt;&lt;TD&gt;2681&lt;/TD&gt;&lt;TD&gt;149&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/16/2020&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I want to get as below,&lt;/P&gt;&lt;TABLE width="293"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="165"&gt;_time&lt;/TD&gt;&lt;TD width="64"&gt;5286&lt;/TD&gt;&lt;TD width="64"&gt;5287&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/15/2020&lt;/TD&gt;&lt;TD&gt;1641&lt;/TD&gt;&lt;TD&gt;2681&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12/16/2020&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 07:58:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533290#M150677</guid>
      <dc:creator>nivethainspire_</dc:creator>
      <dc:date>2020-12-16T07:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533333#M150692</link>
      <description>&lt;P&gt;It didn't work because you used a different query.&amp;nbsp; timechart is a transforming command so you no longer have a "Core Content" field on which to sort.&lt;/P&gt;&lt;P&gt;I don't know how to achieve the results you desire.&amp;nbsp; Sorry.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 13:58:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533333#M150692</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-16T13:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Search by values in field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533350#M150697</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/122614"&gt;@nivethainspire_&lt;/a&gt;, you can use below query,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats list(Count) as Count list(Status) as Status list(Flag) as Flag by "Core Content" 
| sort 2 - "Core Content"
| eval lines=mvzip(Count,Status), lines=mvzip(lines,Flag)
| mvexpand lines
| rex field=lines "(?&amp;lt;Count&amp;gt;[^,]+),(?&amp;lt;Status&amp;gt;[^,]+),(?&amp;lt;Flag&amp;gt;.*)"
| fields - lines
| sort - Count
| addcoltotals Count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 18:14:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-by-values-in-field/m-p/533350#M150697</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2020-12-16T18:14:46Z</dc:date>
    </item>
  </channel>
</rss>

