<?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 Concatenating stats results and visualizing as a single value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-stats-results-and-visualizing-as-a-single-value/m-p/226094#M188312</link>
    <description>&lt;P&gt;Hi there&lt;BR /&gt;
index=someIndex | stats = sum(fieldA) as one, sum(fieldB) as two&lt;/P&gt;

&lt;P&gt;I would like to display the result in the format (one/two) where / is a separator. I want to visualize the output using the "Single value" visualization so I could color/enlarge the below text etc. Can you please help? (I tried using eval to concatenate the results but couldn't get it to work). Thank you.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Desired output :&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;100.30/200.40&lt;/P&gt;

&lt;P&gt;where&lt;BR /&gt;
one = 100.30&lt;BR /&gt;
two = 200.40&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2016 01:35:37 GMT</pubDate>
    <dc:creator>karthiknzx</dc:creator>
    <dc:date>2016-08-11T01:35:37Z</dc:date>
    <item>
      <title>Concatenating stats results and visualizing as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-stats-results-and-visualizing-as-a-single-value/m-p/226094#M188312</link>
      <description>&lt;P&gt;Hi there&lt;BR /&gt;
index=someIndex | stats = sum(fieldA) as one, sum(fieldB) as two&lt;/P&gt;

&lt;P&gt;I would like to display the result in the format (one/two) where / is a separator. I want to visualize the output using the "Single value" visualization so I could color/enlarge the below text etc. Can you please help? (I tried using eval to concatenate the results but couldn't get it to work). Thank you.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Desired output :&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;100.30/200.40&lt;/P&gt;

&lt;P&gt;where&lt;BR /&gt;
one = 100.30&lt;BR /&gt;
two = 200.40&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 01:35:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-stats-results-and-visualizing-as-a-single-value/m-p/226094#M188312</guid>
      <dc:creator>karthiknzx</dc:creator>
      <dc:date>2016-08-11T01:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating stats results and visualizing as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-stats-results-and-visualizing-as-a-single-value/m-p/226095#M188313</link>
      <description>&lt;P&gt;What did you try so far? something like below should work.&lt;BR /&gt;
    | eval result = one."/".two&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 04:08:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-stats-results-and-visualizing-as-a-single-value/m-p/226095#M188313</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2016-08-11T04:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating stats results and visualizing as a single value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Concatenating-stats-results-and-visualizing-as-a-single-value/m-p/226096#M188314</link>
      <description>&lt;P&gt;Thanks. This is what I tried earlier: (but I had a typo which prevented eval from working)&lt;BR /&gt;
&lt;EM&gt;index=someIndex | stats = sum(fieldA) as one, sum(fieldB) as two | eval result = one."/".two&lt;/EM&gt;&lt;BR /&gt;
The above query produced&lt;BR /&gt;
 sum(fieldA), sum(fieldB) and result. &lt;/P&gt;

&lt;P&gt;I just wanted the result. My query should have been: (I just stumbled upon the fields command)&lt;BR /&gt;
&lt;EM&gt;index=someIndex | stats = sum(fieldA) as one, sum(fieldB) as two | eval result = one."/".two | fields result&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 04:50:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Concatenating-stats-results-and-visualizing-as-a-single-value/m-p/226096#M188314</guid>
      <dc:creator>karthiknzx</dc:creator>
      <dc:date>2016-08-11T04:50:59Z</dc:date>
    </item>
  </channel>
</rss>

