<?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: line chart with 2 sets of numbers in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348411#M41762</link>
    <description>&lt;P&gt;@a238574, For plotting two series on chart, you should also have aggregation field name as first first column i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sno     stats1   stats2
sno1    23       5
sno2    45       7
sno3    19       2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you would ideally need to retain aggregation field name in your final result or need to create one. Please share your current query if you need us to look and correct the same. In order to create a new field one of the ways would be to use streamstats &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourCurrentSearch&amp;gt;
    | streamstats count as sno 
    | eval sno="sno".sno 
    | table sno &amp;lt;yourFirstStatsField&amp;gt; &amp;lt;yourSecondStatsField&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the run anywhere search based on sample data provided.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval data="23,5;45,7;19,2" 
| makemv data delim=";" 
| mvexpand data 
| makemv data delim="," 
| eval stats1=mvindex(data,0),stats2=mvindex(data,1) 
| fields - _time data 
| streamstats count as sno 
| eval sno="sno".sno 
| table sno stats1 stats2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please try out and confirm!&lt;/P&gt;</description>
    <pubDate>Wed, 18 Apr 2018 15:10:45 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-04-18T15:10:45Z</dc:date>
    <item>
      <title>line chart with 2 sets of numbers</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348408#M41759</link>
      <description>&lt;P&gt;Ok this has to be easy but for some reason I cant figure it out. I have a query that produces two sets of stats&lt;/P&gt;

&lt;P&gt;23   5&lt;BR /&gt;
45   7&lt;BR /&gt;
19   2&lt;/P&gt;

&lt;P&gt;I would like to see these numbers in a line chart as 2 lines with a single data point for each number. When I try to select line chart for the visualization  by default it tries to pick the 1st set of numbers as the x axis. How do you just tell to graph the numbers&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 13:41:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348408#M41759</guid>
      <dc:creator>a238574</dc:creator>
      <dc:date>2018-04-18T13:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: line chart with 2 sets of numbers</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348409#M41760</link>
      <description>&lt;P&gt;Could you please share your search query (with sensitive data left out)? It will be much easier to help if we can see that. &lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:16:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348409#M41760</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-04-18T14:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: line chart with 2 sets of numbers</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348410#M41761</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;If you try by this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | stats count sum(bytes) by version
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then select multiseries mode in formt of the chart&lt;/P&gt;

&lt;P&gt;can you add information please?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 14:41:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348410#M41761</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2018-04-18T14:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: line chart with 2 sets of numbers</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348411#M41762</link>
      <description>&lt;P&gt;@a238574, For plotting two series on chart, you should also have aggregation field name as first first column i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sno     stats1   stats2
sno1    23       5
sno2    45       7
sno3    19       2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you would ideally need to retain aggregation field name in your final result or need to create one. Please share your current query if you need us to look and correct the same. In order to create a new field one of the ways would be to use streamstats &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourCurrentSearch&amp;gt;
    | streamstats count as sno 
    | eval sno="sno".sno 
    | table sno &amp;lt;yourFirstStatsField&amp;gt; &amp;lt;yourSecondStatsField&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the run anywhere search based on sample data provided.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval data="23,5;45,7;19,2" 
| makemv data delim=";" 
| mvexpand data 
| makemv data delim="," 
| eval stats1=mvindex(data,0),stats2=mvindex(data,1) 
| fields - _time data 
| streamstats count as sno 
| eval sno="sno".sno 
| table sno stats1 stats2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please try out and confirm!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 15:10:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/line-chart-with-2-sets-of-numbers/m-p/348411#M41762</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-04-18T15:10:45Z</dc:date>
    </item>
  </channel>
</rss>

