<?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 re-arrange a bar chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261735#M189722</link>
    <description>&lt;P&gt;Yea, that is correct, but when I ran Inguinn query, I received error message (Error in 'eval' command: The arguments to the 'if' function are invalid.)&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2016 16:28:51 GMT</pubDate>
    <dc:creator>jhoang</dc:creator>
    <dc:date>2016-02-03T16:28:51Z</dc:date>
    <item>
      <title>How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261728#M189715</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I would like to sort my bar chart's by the following sequence, (Intensive, Intermediate, Minimal, Moderate). However it is currently being sorted alphabetically (Intensive, Intermediate, Minimal, Moderate.) &lt;/P&gt;

&lt;P&gt;Below is my current search function:&lt;/P&gt;

&lt;P&gt;index="sdp" Level !="Not Assigned" Urgency="*" | chart count over Level by Urgency | eval Level=if(Level="Intensive", "1. Intensive", if(Level="Intermediate","2. Intermediate", if(Level="Moderate","3. Moderate", if(Level="Minimal", "4. Minimal"&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 23:09:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261728#M189715</guid>
      <dc:creator>jhoang</dc:creator>
      <dc:date>2016-02-01T23:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261729#M189716</link>
      <description>&lt;P&gt;Put the eval before the chart, like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="sdp" Level !="Not Assigned" Urgency="*" 
| eval Level=if(Level="Intensive", "1. Intensive", 
             if(Level="Intermediate","2. Intermediate", 
              if(Level="Moderate","3. Moderate",
            if(Level="Minimal", "4. Minimal"))))
| chart count by Level Urgency 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Feb 2016 02:40:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261729#M189716</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-02-02T02:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261730#M189717</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
try this search code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="sdp" Level !="Not Assigned" Urgency="*" | chart count over Level by Urgency | eval Level=case(Level=="Intensive", "1. Intensive", Level=="Intermediate","2. Intermediate", Level=="Moderate","3. Moderate", Level=="Minimal", "4. Minimal")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Feb 2016 10:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261730#M189717</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2016-02-02T10:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261731#M189718</link>
      <description>&lt;P&gt;Hi Chimell,&lt;/P&gt;

&lt;P&gt;The above query added the values to the different urgency (1,2,3,4) but it is still being arranged in :&lt;/P&gt;

&lt;P&gt;1)intensive&lt;BR /&gt;
2) intermediate&lt;BR /&gt;
4) Minimal&lt;BR /&gt;
3) moderate&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 20:01:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261731#M189718</guid>
      <dc:creator>jhoang</dc:creator>
      <dc:date>2016-02-02T20:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261732#M189719</link>
      <description>&lt;P&gt;Hi Iguinn,&lt;/P&gt;

&lt;P&gt;Another agent is helping me on this item, thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 20:02:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261732#M189719</guid>
      <dc:creator>jhoang</dc:creator>
      <dc:date>2016-02-02T20:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261733#M189720</link>
      <description>&lt;P&gt;Hi Chimell,&lt;/P&gt;

&lt;P&gt;Any update on this?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 14:54:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261733#M189720</guid>
      <dc:creator>jhoang</dc:creator>
      <dc:date>2016-02-03T14:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261734#M189721</link>
      <description>&lt;P&gt;I don't see any difference in your expected and current sort order. Do you expect Intensive, Intermediate, Moderate, Minimal as final sorting??? If yes, then @Iguinn's answer will give you correct sort order, after you update the expected sequence in that.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 15:58:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261734#M189721</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-03T15:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261735#M189722</link>
      <description>&lt;P&gt;Yea, that is correct, but when I ran Inguinn query, I received error message (Error in 'eval' command: The arguments to the 'if' function are invalid.)&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 16:28:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261735#M189722</guid>
      <dc:creator>jhoang</dc:creator>
      <dc:date>2016-02-03T16:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261736#M189723</link>
      <description>&lt;P&gt;Here is same query with case instead of if.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="sdp" Level !="Not Assigned" Urgency="*"  | eval Level=case(Level="Intensive", "1. Intensive", Level="Intermediate","2. Intermediate",Level="Moderate","3. Moderate", Level="Minimal", "4. Minimal", 1=1, "5. Not defined") | chart count by Level Urgency 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure the numbering is as per your need.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 17:28:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261736#M189723</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-03T17:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to re-arrange a bar chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261737#M189724</link>
      <description>&lt;P&gt;it worked!!!! Thank you Somesoni2!!!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2016 17:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-re-arrange-a-bar-chart/m-p/261737#M189724</guid>
      <dc:creator>jhoang</dc:creator>
      <dc:date>2016-02-03T17:56:13Z</dc:date>
    </item>
  </channel>
</rss>

