<?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: Chart examples in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315971#M94562</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="Jan 2017,A, 1,2::Jan 2017,B, 3,4::Jan 2017,C, 5,6::Feb 2017,A, 7,8::Feb 2017,B, 10,12::Feb 2017,C, 13,16::Mar 2017,A, 1,2::Mar 2017,B, 3,4::Mar 2017,C, 5,6" 
| makemv delim="::" raw 
| mvexpand raw
| rename raw AS _raw
| rex "^(?&amp;lt;Month&amp;gt;[^,]+),(?&amp;lt;Type&amp;gt;[^,]+),(?&amp;lt;Value&amp;gt;.*)$"
| fields - _*

| rename COMMENT AS "Everything above fakes your data; everything below is your solution"

| chart list(Value) AS Value OVER Type BY Month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;At this point, you may be interested in my (as yet unaccepted) answer here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/522959/cannot-sort-dynamic-column-in-date-format.html#answer-522684"&gt;https://answers.splunk.com/answers/522959/cannot-sort-dynamic-column-in-date-format.html#answer-522684&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 23 May 2017 20:16:45 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-05-23T20:16:45Z</dc:date>
    <item>
      <title>Chart examples</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315970#M94561</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have the data in the below format i.e i have calculated base on Type A,B,C per month and the data looks like &lt;BR /&gt;
Jan 2017,A, 1,2&lt;BR /&gt;
Jan 2017,B, 3,4&lt;BR /&gt;
Jan 2017,C, 5,6&lt;BR /&gt;
Feb 2017,A, 7,8&lt;BR /&gt;
Feb 2017,B, 10,12&lt;BR /&gt;
Feb 2017,C, 13,16&lt;BR /&gt;
Mar 2017,A, 1,2&lt;BR /&gt;
Mar 2017,B, 3,4&lt;BR /&gt;
Mar 2017,C, 5,6&lt;/P&gt;

&lt;P&gt;I want to convert this data in to the below format:&lt;BR /&gt;
    Jan 2017,Feb 2017,Mar 2017&lt;BR /&gt;
A,  1,2      7,8      1,2&lt;BR /&gt;&lt;BR /&gt;
B,  3,4      10,12    3,4&lt;BR /&gt;&lt;BR /&gt;
C,  5,6      13,16    5,6 &lt;/P&gt;

&lt;P&gt;is there any simple method to do so?&lt;BR /&gt;
Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 19:44:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315970#M94561</guid>
      <dc:creator>chintan_shah</dc:creator>
      <dc:date>2017-05-23T19:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Chart examples</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315971#M94562</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="Jan 2017,A, 1,2::Jan 2017,B, 3,4::Jan 2017,C, 5,6::Feb 2017,A, 7,8::Feb 2017,B, 10,12::Feb 2017,C, 13,16::Mar 2017,A, 1,2::Mar 2017,B, 3,4::Mar 2017,C, 5,6" 
| makemv delim="::" raw 
| mvexpand raw
| rename raw AS _raw
| rex "^(?&amp;lt;Month&amp;gt;[^,]+),(?&amp;lt;Type&amp;gt;[^,]+),(?&amp;lt;Value&amp;gt;.*)$"
| fields - _*

| rename COMMENT AS "Everything above fakes your data; everything below is your solution"

| chart list(Value) AS Value OVER Type BY Month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;At this point, you may be interested in my (as yet unaccepted) answer here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/522959/cannot-sort-dynamic-column-in-date-format.html#answer-522684"&gt;https://answers.splunk.com/answers/522959/cannot-sort-dynamic-column-in-date-format.html#answer-522684&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 20:16:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315971#M94562</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-23T20:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Chart examples</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315972#M94563</link>
      <description>&lt;P&gt;Hi Woodcock,&lt;/P&gt;

&lt;H2&gt;the above solution will works when we have only three components but in my case i have 4 components such as 1 and 2 which wont work.&lt;/H2&gt;

&lt;P&gt;I have the below query &lt;BR /&gt;
index=guistats_summary DIVISION_CD=E GUI_Enable=Y COUNTRY_CD="EE" OR COUNTRY_CD="LT" OR COUNTRY_CD="LV" OR COUNTRY_CD="LB" | bin span=1mon _time | eval GUI_Count=if(GUI_IND="Y",Total_Count,0), Non_GUI_Count=if(GUI_IND="N",Total_Count,0)|rename _time as Date|eval Date=strftime(Date,"%b-%y")|chart sum(GUI_Count) as GUI_Count,sum(Non_GUI_Count) as Non_GUI_Count OVER COUNTRY_CD By Date&lt;BR /&gt;
 which give the below results&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;COUNTRY_CD  GUI_Count: Feb-17   GUI_Count: Jan-17   GUI_Count: Mar-17   Non_GUI_Count: Feb-17   Non_GUI_Count: Jan-17   Non_GUI_Count: Mar-17&lt;BR /&gt;&lt;BR /&gt;
EE          344                 237                 249                 262                     304                     251&lt;BR /&gt;&lt;BR /&gt;
LB          2576                2173                2800                251                     9                       2&lt;BR /&gt;&lt;BR /&gt;
LT          367                 347                 411                 292                     489                     354&lt;BR /&gt;&lt;BR /&gt;
LV          587                 449                 449                 387                     108                     75                      &lt;/P&gt;

&lt;P&gt;is it possible to arrange the column so that GUI_Count and Non GUI for same months comes together so that i dont need to run tables /fields command?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315972#M94563</guid>
      <dc:creator>chintan_shah</dc:creator>
      <dc:date>2020-09-29T14:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Chart examples</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315973#M94564</link>
      <description>&lt;P&gt;I do not understand at all.  It might help if you just extend the original fake data to be "four components" as you put it (which I also do not understand).  It would be even better if you modify my "fakes your data" stuff so that it generates fake data more like you are saying you need.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 01:37:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315973#M94564</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-26T01:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Chart examples</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315974#M94565</link>
      <description>&lt;P&gt;|table Value _time host counter &lt;/P&gt;

&lt;P&gt;value  _time  host  counter&lt;BR /&gt;
42       somedate test idle&lt;BR /&gt;
43       somedate test notidle&lt;BR /&gt;
52       anotherdate test idle&lt;BR /&gt;
55       anotherdate test notidle&lt;/P&gt;

&lt;P&gt;i want to see below, how to do it with chart..&lt;/P&gt;

&lt;P&gt;host  _time idle notidle &lt;BR /&gt;
test    somedate  42 43&lt;BR /&gt;
test anotherdate 52 55&lt;/P&gt;</description>
      <pubDate>Wed, 10 Oct 2018 08:33:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-examples/m-p/315974#M94565</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2018-10-10T08:33:41Z</dc:date>
    </item>
  </channel>
</rss>

