<?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 Sort JSON Data by field value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Sort-JSON-Data-by-field-value/m-p/709784#M239858</link>
    <description>&lt;P&gt;Splunk uses different colors for different numeric fields. &amp;nbsp;Your stats command results in only one, count. &amp;nbsp;There are many ways to make a field named Pass and another named Fail. &amp;nbsp;As your output only contains a 2x2, the easiest is probably just transpose the output.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="sampleindex" source="samplesource" test_name="IR Test" serial_number="TC-7"
| stats count by result
| transpose header_field=result&lt;/LI-CODE&gt;&lt;P&gt;Additional tips:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Do not use screenshot to share text data. &amp;nbsp;Share raw text.&lt;/LI&gt;&lt;LI&gt;Do not cascade filters that can be performed in initial index search.&lt;/LI&gt;&lt;LI&gt;Format Splunk searches with pipe sign at beginning of line, not end. &amp;nbsp;You can enable "Search auto-format" in preferences to help you create readable searches.&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Sun, 26 Jan 2025 06:38:42 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2025-01-26T06:38:42Z</dc:date>
    <item>
      <title>How to Sort JSON Data by field value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Sort-JSON-Data-by-field-value/m-p/709691#M239838</link>
      <description>&lt;P&gt;I have a base query which yield the field result, result can be either "Pass" or "Fail"&lt;/P&gt;&lt;P&gt;Sample query result is attached&lt;BR /&gt;&lt;BR /&gt;How can I create a column chart with the count of passes and fails as different color columns?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my current search which yields a column chart with two columns of the same color&lt;/P&gt;&lt;PRE&gt;index="sampleindex" source="samplesource" | &lt;BR /&gt;search test_name="IR Test" | &lt;BR /&gt;search serial_number="TC-7"|&lt;BR /&gt;spath result | &lt;BR /&gt;stats count by result&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 14:02:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Sort-JSON-Data-by-field-value/m-p/709691#M239838</guid>
      <dc:creator>nkavouris</dc:creator>
      <dc:date>2025-01-24T14:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Sort JSON Data by field value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Sort-JSON-Data-by-field-value/m-p/709784#M239858</link>
      <description>&lt;P&gt;Splunk uses different colors for different numeric fields. &amp;nbsp;Your stats command results in only one, count. &amp;nbsp;There are many ways to make a field named Pass and another named Fail. &amp;nbsp;As your output only contains a 2x2, the easiest is probably just transpose the output.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="sampleindex" source="samplesource" test_name="IR Test" serial_number="TC-7"
| stats count by result
| transpose header_field=result&lt;/LI-CODE&gt;&lt;P&gt;Additional tips:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Do not use screenshot to share text data. &amp;nbsp;Share raw text.&lt;/LI&gt;&lt;LI&gt;Do not cascade filters that can be performed in initial index search.&lt;/LI&gt;&lt;LI&gt;Format Splunk searches with pipe sign at beginning of line, not end. &amp;nbsp;You can enable "Search auto-format" in preferences to help you create readable searches.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sun, 26 Jan 2025 06:38:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Sort-JSON-Data-by-field-value/m-p/709784#M239858</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2025-01-26T06:38:42Z</dc:date>
    </item>
  </channel>
</rss>

