<?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 do i reference columns that have been displayed as a result of previous chart command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424925#M121840</link>
    <description>&lt;P&gt;After chart command, you'd see value of "Survey Type" field appearing as separate fields (in your example "a" and "b"). So you'd reference them like any other field, but would use "a" or "b" instead of "Survey Type". If they contain spaces, hyphen or other special characters, use them within single quotes in eval and where expressions,  and within double quotes in other places.&lt;/P&gt;

&lt;P&gt;e.g. (just an example of syntax)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | chart count over "Survey Month" by "Survey Type"  | eval "a"='a'*20 | where 'b'&amp;lt;'a'  | stats sum("b") as "B" by "a"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Jun 2019 19:04:22 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2019-06-13T19:04:22Z</dc:date>
    <item>
      <title>How do i reference columns that have been displayed as a result of previous chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424923#M121838</link>
      <description>&lt;P&gt;I have done a chart command --&amp;gt; chart count over "Survey Month" by "Survey Type"   and the result displays the two survey types "a" and "b" as columns along with Survey month . Now how do i further reference column a and b to perform other calculations?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 04:00:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424923#M121838</guid>
      <dc:creator>monyathomas</dc:creator>
      <dc:date>2019-06-13T04:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do i reference columns that have been displayed as a result of previous chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424924#M121839</link>
      <description>&lt;P&gt;Can you provide some sample data and a more clear idea of what calculations you are looking to do after the initial chart command?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 18:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424924#M121839</guid>
      <dc:creator>jnudell_2</dc:creator>
      <dc:date>2019-06-13T18:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do i reference columns that have been displayed as a result of previous chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424925#M121840</link>
      <description>&lt;P&gt;After chart command, you'd see value of "Survey Type" field appearing as separate fields (in your example "a" and "b"). So you'd reference them like any other field, but would use "a" or "b" instead of "Survey Type". If they contain spaces, hyphen or other special characters, use them within single quotes in eval and where expressions,  and within double quotes in other places.&lt;/P&gt;

&lt;P&gt;e.g. (just an example of syntax)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | chart count over "Survey Month" by "Survey Type"  | eval "a"='a'*20 | where 'b'&amp;lt;'a'  | stats sum("b") as "B" by "a"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 19:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424925#M121840</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-06-13T19:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do i reference columns that have been displayed as a result of previous chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424926#M121841</link>
      <description>&lt;P&gt;Thanks a ton! This helps!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2019 09:01:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424926#M121841</guid>
      <dc:creator>monyathomas</dc:creator>
      <dc:date>2019-06-14T09:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do i reference columns that have been displayed as a result of previous chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424927#M121842</link>
      <description>&lt;P&gt;@monyathomas If your problem is resolved, please accept the answer to help future readers.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jun 2019 14:38:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424927#M121842</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-06-16T14:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do i reference columns that have been displayed as a result of previous chart command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424928#M121843</link>
      <description>&lt;P&gt;You should just be able to use &lt;CODE&gt;a&lt;/CODE&gt; and &lt;CODE&gt;b&lt;/CODE&gt; but if you need it to be oriented differently, then you can switch from using &lt;CODE&gt;chart&lt;/CODE&gt; to using &lt;CODE&gt;stats&lt;/CODE&gt; or you could use the &lt;CODE&gt;untable&lt;/CODE&gt; command to do the same thing.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Jun 2019 23:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-i-reference-columns-that-have-been-displayed-as-a-result/m-p/424928#M121843</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-06-16T23:46:15Z</dc:date>
    </item>
  </channel>
</rss>

