<?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: Customize Order of Column Chart by sort_order Field in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665743#M54450</link>
    <description>&lt;P&gt;Try this way round&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart count by income
| eval sort_order=case(income=="$24,000 and under",1,income=="$25,000 - $39,999",2,income=="$40,000 - $79,999",3,income=="$80,000 - $119,999",4,income=="$120,000 - $199,999",5,income=="$200,000 or more",6)
| sort sort_order
| fields - sort_order&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 21 Oct 2023 09:57:20 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-10-21T09:57:20Z</dc:date>
    <item>
      <title>Customize Order of Column Chart by sort_order Field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665721#M54445</link>
      <description>&lt;P&gt;I'm working on a column chart visualization that show income ranges:&lt;BR /&gt;&lt;BR /&gt;"$24,999 and under"&lt;BR /&gt;"$25,000&amp;nbsp; - $99,999"&lt;BR /&gt;"$100,000 and up"&lt;BR /&gt;&lt;BR /&gt;The problem is that when the column chart orders them, it puts "$100,000 and up" first instead of last.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've created an eval that assigns a sort_order value based on the field value that orders them correctly.&amp;nbsp; However, I can't figure out how to get the column chart to sort according to that field.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This is what I'm currently trying:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval sort_order=case(income=="$24,000 and under",1,income=="$25,000 - $39,999",2,income=="$40,000 - $79,999",3,income=="$80,000 - $119,999",4,income=="$120,000 - $199,999",5,income=="$200,000 or more",6)
| sort sort_order
| chart count by income&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the visualization:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-10-20 at 4.07.01 PM.png" style="width: 726px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27682iE1AC0EA7D0C8625C/image-dimensions/726x147?v=v2" width="726" height="147" role="button" title="Screen Shot 2023-10-20 at 4.07.01 PM.png" alt="Screen Shot 2023-10-20 at 4.07.01 PM.png" /&gt;&lt;/span&gt;Is there some other way to accomplish this?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 21:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665721#M54445</guid>
      <dc:creator>PReynoldsBitsIO</dc:creator>
      <dc:date>2023-10-20T21:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Order of Column Chart by sort_order Field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665742#M54449</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239792"&gt;@PReynoldsBitsIO&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if income field has fixed values (how it seems) you could use something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| eval 
   income=case(income="$24,000 and under","1$24,000 and under",
   income="$25,000 - $39,999","2$25,000 - $39,999",
   income="$40,000 - $79,999","3$40,000 - $79,999",
   income="$80,000 - $119,999","4$80,000 - $119,999",
   income="$120,000 - $199,999","5$120,000 - $199,999",
   income="$200,000 or more","6$200,000 or more")
| chart count by income
| rename 
   "1$24,000 and under" AS "$24,000 and under"
   "2$25,000 - $39,999" AS "$25,000 - $39,999"
   "3$40,000 - $79,999" AS "$40,000 - $79,999"
   "4$80,000 - $119,999" AS "$80,000 - $119,999"
   "5$120,000 - $199,999" AS "$120,000 - $199,999"
   "6$200,000 or more" AS "$200,000 or more"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 09:49:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665742#M54449</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-21T09:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Order of Column Chart by sort_order Field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665743#M54450</link>
      <description>&lt;P&gt;Try this way round&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart count by income
| eval sort_order=case(income=="$24,000 and under",1,income=="$25,000 - $39,999",2,income=="$40,000 - $79,999",3,income=="$80,000 - $119,999",4,income=="$120,000 - $199,999",5,income=="$200,000 or more",6)
| sort sort_order
| fields - sort_order&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 21 Oct 2023 09:57:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665743#M54450</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-21T09:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Order of Column Chart by sort_order Field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665845#M54455</link>
      <description>&lt;P&gt;This didn't work.&amp;nbsp; The chart doesn't respond to the sort order.&amp;nbsp; Thanks for the attempt though.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 12:45:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665845#M54455</guid>
      <dc:creator>PReynoldsBitsIO</dc:creator>
      <dc:date>2023-10-23T12:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Order of Column Chart by sort_order Field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665846#M54456</link>
      <description>&lt;P&gt;Sadly, this didn't work.&amp;nbsp; The rename won't change the column values.&amp;nbsp; I have found a solution though, thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 12:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665846#M54456</guid>
      <dc:creator>PReynoldsBitsIO</dc:creator>
      <dc:date>2023-10-23T12:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Order of Column Chart by sort_order Field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665850#M54457</link>
      <description>&lt;P&gt;I wound up coming up with a solution.&amp;nbsp; Any spaces at the start of the field will be truncated when Splunk builds that chart.&amp;nbsp; I made a sort_order field that adds spaces to the start of the field value.&amp;nbsp; The more spaces, the earlier in the chart order the field is placed.&lt;BR /&gt;&lt;BR /&gt;Here's the code now:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Base Search&amp;gt;
| eval sort_order=case(
    income=="$24,000 and under","     $24,000 and under",
    income=="$25,000 - $39,999","    $25,000 - $39,999",
    income=="$40,000 - $79,999","   $40,000 - $79,999",
    income=="$80,000 - $119,999","  $80,000 - $119,999",
    income=="$120,000 - $199,999"," $120,000 - $199,999",
    income=="$200,000 or more","$200,000 or more")
| chart count by sort_order&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2023-10-23 at 7.57.07 AM.png" style="width: 707px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27701i274FF095DAEB5F5F/image-dimensions/707x142?v=v2" width="707" height="142" role="button" title="Screen Shot 2023-10-23 at 7.57.07 AM.png" alt="Screen Shot 2023-10-23 at 7.57.07 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 12:58:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665850#M54457</guid>
      <dc:creator>PReynoldsBitsIO</dc:creator>
      <dc:date>2023-10-23T12:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Order of Column Chart by sort_order Field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665859#M54458</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/239792"&gt;@PReynoldsBitsIO&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 14:13:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/665859#M54458</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-23T14:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Customize Order of Column Chart by sort_order Field</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/708986#M57998</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;after your basic search you can create a table. Then you can use replace&amp;nbsp; like &lt;STRONG&gt;| replace blub with 1blub&lt;/STRONG&gt; ...&lt;/P&gt;&lt;P&gt;Then you create a chart&amp;nbsp; and do a rename after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 13:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Customize-Order-of-Column-Chart-by-sort-order-Field/m-p/708986#M57998</guid>
      <dc:creator>Aufex</dc:creator>
      <dc:date>2025-01-16T13:24:40Z</dc:date>
    </item>
  </channel>
</rss>

