<?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 to rename multiple fields in a chart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224747#M66218</link>
    <description>&lt;P&gt;If you use column-split options with charting commands like chart/timechart (&lt;CODE&gt;over field by field&lt;/CODE&gt; for &lt;CODE&gt;chart&lt;/CODE&gt; and &lt;CODE&gt;by field&lt;/CODE&gt; for &lt;CODE&gt;timechart&lt;/CODE&gt;), it'll creates columns which include the values of the by clause field. &lt;/P&gt;

&lt;P&gt;E.g. &lt;CODE&gt;..|chart count over field1 by field2&lt;/CODE&gt; will give columns &lt;CODE&gt;field1, field2value1 field2value2....&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If you're using multiple aggregation, Splunk can't differentiate them with just the field1value, so it appends the aggregation column names as well.&lt;/P&gt;

&lt;P&gt;E.g. &lt;CODE&gt;..|chart count dc(field3)  over field1 by field2&lt;/CODE&gt; will give columns &lt;CODE&gt;field1, count:field2value1 count:field2value2...   dc(field3):field2value1, dc(field3):field2value2....&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I would rename aggregation field within chart command itself to give a proper name so that chart generates series with proper names. E.g. &lt;CODE&gt;..|chart count dc(field3)  as label over field1 by field2&lt;/CODE&gt; will give columns &lt;CODE&gt;field1, count:field2value1 count:field2value2...   label:field2value1, label:field2value2....&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;What is the field name that you expect to come? Consider using stats instead of chart.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2016 15:47:47 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-09-29T15:47:47Z</dc:date>
    <item>
      <title>How to rename multiple fields in a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224744#M66215</link>
      <description>&lt;P&gt;When i run the following query, my legend has the values as &lt;CODE&gt;values(fieldname)&lt;/CODE&gt;: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main source=daily_report sourcetype=ironport_stats | chart values(malicious_url),values(detected_virus) over insert_date by server
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How would I rename the values fields so they show up as what I want in the legend of the graph?&lt;/P&gt;

&lt;P&gt;Thanks in advance! &lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 04:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224744#M66215</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2016-09-29T04:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename multiple fields in a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224745#M66216</link>
      <description>&lt;P&gt;Try:&lt;BR /&gt;
 index=main source=daily_report sourcetype=ironport_stats | chart values(malicious_url),values(detected_virus) over insert_date by server | rename values(malicious_url) as malicious_url values(detected_virus) as detected_virus&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:14:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224745#M66216</guid>
      <dc:creator>mydog8it</dc:creator>
      <dc:date>2020-09-29T11:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename multiple fields in a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224746#M66217</link>
      <description>&lt;P&gt;this didn't work. the legend still shows: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;values(malicious_url): mail1&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;values(malicious_url): mail2&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 15:37:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224746#M66217</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2016-09-29T15:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename multiple fields in a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224747#M66218</link>
      <description>&lt;P&gt;If you use column-split options with charting commands like chart/timechart (&lt;CODE&gt;over field by field&lt;/CODE&gt; for &lt;CODE&gt;chart&lt;/CODE&gt; and &lt;CODE&gt;by field&lt;/CODE&gt; for &lt;CODE&gt;timechart&lt;/CODE&gt;), it'll creates columns which include the values of the by clause field. &lt;/P&gt;

&lt;P&gt;E.g. &lt;CODE&gt;..|chart count over field1 by field2&lt;/CODE&gt; will give columns &lt;CODE&gt;field1, field2value1 field2value2....&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;If you're using multiple aggregation, Splunk can't differentiate them with just the field1value, so it appends the aggregation column names as well.&lt;/P&gt;

&lt;P&gt;E.g. &lt;CODE&gt;..|chart count dc(field3)  over field1 by field2&lt;/CODE&gt; will give columns &lt;CODE&gt;field1, count:field2value1 count:field2value2...   dc(field3):field2value1, dc(field3):field2value2....&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I would rename aggregation field within chart command itself to give a proper name so that chart generates series with proper names. E.g. &lt;CODE&gt;..|chart count dc(field3)  as label over field1 by field2&lt;/CODE&gt; will give columns &lt;CODE&gt;field1, count:field2value1 count:field2value2...   label:field2value1, label:field2value2....&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;What is the field name that you expect to come? Consider using stats instead of chart.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 15:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-multiple-fields-in-a-chart/m-p/224747#M66218</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-29T15:47:47Z</dc:date>
    </item>
  </channel>
</rss>

