<?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 How to sort table by total errors in descending order? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-table-by-total-errors-in-descending-order/m-p/474890#M133514</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
 I have this search and basically it shows a table with the channel. &lt;BR /&gt;
Error type, total error, and the sum total of the errors- but I append a sort function at the end to sort by total but it doesn't sort it?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=appguids host=netweba* ApplicationID=order20 ApplicationSource=*order* errorguid Monster.PaymentProcessor.PaymentFailedException | rex field=Message "(?m)^Message:[^:]+:\s(?&amp;lt;type&amp;gt;.*)$" | stats count BY type,ChannelID | lookup local=1 MonsterChannels ChannelId AS ChannelID | eval Channel=if(isnull(Channel) OR match(Channel,"^0$"),"Unknown ChannelID", Channel) . " [ChannelID: " . ChannelID . "]" | stats values(type) AS "Error Type", list(count) AS "#Errors" BY Channel |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;appendpipe [ stats sum("#Errors") AS "#Errors" BY Channel | eval "Error Type"="Total for Channel" ] | stats values(Channel) AS X, list("Error Type") AS "Error Type", list("#Errors") AS "#Errors" BY Channel | fields - X | sort - "Total for Channel"&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Nov 2019 03:11:06 GMT</pubDate>
    <dc:creator>lsy9891</dc:creator>
    <dc:date>2019-11-04T03:11:06Z</dc:date>
    <item>
      <title>How to sort table by total errors in descending order?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-table-by-total-errors-in-descending-order/m-p/474890#M133514</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
 I have this search and basically it shows a table with the channel. &lt;BR /&gt;
Error type, total error, and the sum total of the errors- but I append a sort function at the end to sort by total but it doesn't sort it?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=appguids host=netweba* ApplicationID=order20 ApplicationSource=*order* errorguid Monster.PaymentProcessor.PaymentFailedException | rex field=Message "(?m)^Message:[^:]+:\s(?&amp;lt;type&amp;gt;.*)$" | stats count BY type,ChannelID | lookup local=1 MonsterChannels ChannelId AS ChannelID | eval Channel=if(isnull(Channel) OR match(Channel,"^0$"),"Unknown ChannelID", Channel) . " [ChannelID: " . ChannelID . "]" | stats values(type) AS "Error Type", list(count) AS "#Errors" BY Channel |
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;appendpipe [ stats sum("#Errors") AS "#Errors" BY Channel | eval "Error Type"="Total for Channel" ] | stats values(Channel) AS X, list("Error Type") AS "Error Type", list("#Errors") AS "#Errors" BY Channel | fields - X | sort - "Total for Channel"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 03:11:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-table-by-total-errors-in-descending-order/m-p/474890#M133514</guid>
      <dc:creator>lsy9891</dc:creator>
      <dc:date>2019-11-04T03:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort table by total errors in descending order?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-table-by-total-errors-in-descending-order/m-p/474891#M133515</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;sort - "Total for Channel"
⇨
sort - "#Errors"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, How about this?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 06:49:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-table-by-total-errors-in-descending-order/m-p/474891#M133515</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-11-04T06:49:05Z</dc:date>
    </item>
  </channel>
</rss>

