<?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 the field name of the maximum value of several fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-field-name-of-the-maximum-value-of-several-fields/m-p/392681#M114227</link>
    <description>&lt;P&gt;It would be helpful to have some context on what your end goal is, but what you're describing is possible by just doing something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics* | fieldsummary | sort - max | head 1 | fields field max
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics* | fieldsummary | stats max(max) as max by field | sort - max
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 14 Jun 2018 23:37:37 GMT</pubDate>
    <dc:creator>masonmorales</dc:creator>
    <dc:date>2018-06-14T23:37:37Z</dc:date>
    <item>
      <title>How to get the field name of the maximum value of several fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-field-name-of-the-maximum-value-of-several-fields/m-p/392680#M114226</link>
      <description>&lt;P&gt;I have data that has several fields. I want to compare the fields to find the max value of them, which I can do via &lt;BR /&gt;
&lt;CODE&gt;| eval maximum=max(field1, field2, field3)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;However, I also want to return the field name of the value that is the highest. Is there a simple function that does this?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 21:52:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-field-name-of-the-maximum-value-of-several-fields/m-p/392680#M114226</guid>
      <dc:creator>brajaram</dc:creator>
      <dc:date>2018-06-14T21:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the field name of the maximum value of several fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-field-name-of-the-maximum-value-of-several-fields/m-p/392681#M114227</link>
      <description>&lt;P&gt;It would be helpful to have some context on what your end goal is, but what you're describing is possible by just doing something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics* | fieldsummary | sort - max | head 1 | fields field max
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal source=*metrics* | fieldsummary | stats max(max) as max by field | sort - max
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 23:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-field-name-of-the-maximum-value-of-several-fields/m-p/392681#M114227</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2018-06-14T23:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the field name of the maximum value of several fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-field-name-of-the-maximum-value-of-several-fields/m-p/392682#M114228</link>
      <description>&lt;P&gt;After sorting . pipe the result to "|head 1" to display just the one row you are interested in.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 20:35:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-the-field-name-of-the-maximum-value-of-several-fields/m-p/392682#M114228</guid>
      <dc:creator>sunilsk1</dc:creator>
      <dc:date>2018-10-05T20:35:48Z</dc:date>
    </item>
  </channel>
</rss>

