<?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 question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312984#M93688</link>
    <description>&lt;P&gt;@kennethyeung, as stated I had provided run anywhere search for testing out with the sample data provided in your question. You required to apply the final two command i.e. &lt;CODE&gt;fieldformat&lt;/CODE&gt; and &lt;CODE&gt;chart&lt;/CODE&gt; to your existing search.&lt;/P&gt;

&lt;P&gt;In case per day you can have more than one values of each component you should use last(), first(), min() or max() of price rather than values() which will return multiple values for price hence will not show up on chart.&lt;/P&gt;

&lt;P&gt;Since you already have found a working answer, I am expecting you do not have more than one price per component per day. Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
    <pubDate>Sun, 15 Oct 2017 19:57:52 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-10-15T19:57:52Z</dc:date>
    <item>
      <title>Chart question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312979#M93683</link>
      <description>&lt;P&gt;i have a table like&lt;BR /&gt;
date. prduct, price&lt;BR /&gt;
171015, abc, 10&lt;BR /&gt;
171015, CDE, 15&lt;BR /&gt;
171014, abc, 8&lt;BR /&gt;
171014 CDE, 9&lt;/P&gt;

&lt;P&gt;how can i put it  like that&lt;BR /&gt;
Date ABC, CDE&lt;BR /&gt;
171015, 10,15&lt;BR /&gt;
171014, 9,8&lt;/P&gt;

&lt;P&gt;also is it how to visualization&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 08:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312979#M93683</guid>
      <dc:creator>kennethyeung</dc:creator>
      <dc:date>2017-10-15T08:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Chart question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312980#M93684</link>
      <description>&lt;P&gt;Hi  kennethyeung,&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index
| chart values(price) AS price over Date by product
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 08:45:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312980#M93684</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-15T08:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Chart question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312981#M93685</link>
      <description>&lt;P&gt;Will you be having only one price per product per day?&lt;/P&gt;

&lt;P&gt;Following is run anywhere search. Commands till table are used to mock the data provided in the question. You need to apply the commands after that to your base search and use the Column or Line Chart to visualize the data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval data="171015,abc,10;171015,CDE,15;171014,abc,8;171014,CDE,9"
| makemv data delim=";" 
| mvexpand data
| makemv data delim=","
| eval date=mvindex(data,0)
| eval product=mvindex(data,1)
| eval price=mvindex(data,2)
| table date product price
| fieldformat date=strftime(strptime(date,"%y%m%d"),"%Y/%m/%d")
| chart last(price) as price over date by product
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 15 Oct 2017 08:50:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312981#M93685</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-15T08:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Chart question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312982#M93686</link>
      <description>&lt;P&gt;not work as my expect,&lt;BR /&gt;
you search data is type by myself , not search from the result.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 10:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312982#M93686</guid>
      <dc:creator>kennethyeung</dc:creator>
      <dc:date>2017-10-15T10:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Chart question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312983#M93687</link>
      <description>&lt;P&gt;Thanks. this is what i want&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 10:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312983#M93687</guid>
      <dc:creator>kennethyeung</dc:creator>
      <dc:date>2017-10-15T10:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Chart question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312984#M93688</link>
      <description>&lt;P&gt;@kennethyeung, as stated I had provided run anywhere search for testing out with the sample data provided in your question. You required to apply the final two command i.e. &lt;CODE&gt;fieldformat&lt;/CODE&gt; and &lt;CODE&gt;chart&lt;/CODE&gt; to your existing search.&lt;/P&gt;

&lt;P&gt;In case per day you can have more than one values of each component you should use last(), first(), min() or max() of price rather than values() which will return multiple values for price hence will not show up on chart.&lt;/P&gt;

&lt;P&gt;Since you already have found a working answer, I am expecting you do not have more than one price per component per day. Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2017 19:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-question/m-p/312984#M93688</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-15T19:57:52Z</dc:date>
    </item>
  </channel>
</rss>

