<?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: Rename column in the Stats fuction with the values of the Field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534103#M150944</link>
    <description>&lt;P&gt;Please check if this helps .&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="saravanan90_1-1608888691028.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12363iB6947A2975ABB877/image-size/medium?v=v2&amp;amp;px=400" role="button" title="saravanan90_1-1608888691028.png" alt="saravanan90_1-1608888691028.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Dec 2020 09:32:18 GMT</pubDate>
    <dc:creator>saravanan90</dc:creator>
    <dc:date>2020-12-25T09:32:18Z</dc:date>
    <item>
      <title>Rename column in the Stats fuction with the values of the Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534089#M150939</link>
      <description>&lt;P&gt;I would like to get a stats per week of a Customer that would be result like the &lt;STRONG&gt;Table 1.&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;The data I'm playing with is 100+ Customer and randomly values.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table 1.&lt;/STRONG&gt;&lt;/P&gt;&lt;TABLE width="419"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="43"&gt;Week&lt;/TD&gt;&lt;TD width="76"&gt;CustomerA&lt;/TD&gt;&lt;TD width="75"&gt;CustomerB&lt;/TD&gt;&lt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&lt;TR&gt;&lt;TD width="55px"&gt;Date&lt;/TD&gt;&lt;TD width="93px"&gt;Customer&lt;/TD&gt;&lt;TD width="69px"&gt;Penalty&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="55px"&gt;11-Dec&lt;/TD&gt;&lt;TD width="93px"&gt;CustomerA&lt;/TD&gt;&lt;TD width="69px"&gt;Code32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="55px"&gt;2-Nov&lt;/TD&gt;&lt;TD width="93px"&gt;CustomerB&lt;/TD&gt;&lt;TD width="69px"&gt;Code32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="55px"&gt;3-Oct&lt;/TD&gt;&lt;TD width="93px"&gt;CustomerA&lt;/TD&gt;&lt;TD width="69px"&gt;Code31&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="55px"&gt;5-Dec&lt;/TD&gt;&lt;TD width="93px"&gt;CustomerA&lt;/TD&gt;&lt;TD width="69px"&gt;Code01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="55px"&gt;5-Nov&lt;/TD&gt;&lt;TD width="93px"&gt;CustomerA&lt;/TD&gt;&lt;TD width="69px"&gt;Code22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="55px"&gt;5-Nov&lt;/TD&gt;&lt;TD width="93px"&gt;CustomerC&lt;/TD&gt;&lt;TD width="69px"&gt;Code11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="55px"&gt;9-Nov&lt;/TD&gt;&lt;TD width="93px"&gt;CustomerB&lt;/TD&gt;&lt;TD width="69px"&gt;Code31&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the Span command&amp;nbsp; to compile it as per Week and did the stats command below however this result not showing the way I need it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|stats count by Customer by Week&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to count the penalty of each customer per week and do some stack bar graph.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dashield_0-1608886150725.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12361i7CD12AECB1CCB4E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dashield_0-1608886150725.png" alt="dashield_0-1608886150725.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there a way to count the specific value of the field(Customer) and use that KEY to be column name just like the Table 1 above?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 08:51:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534089#M150939</guid>
      <dc:creator>dashield</dc:creator>
      <dc:date>2020-12-25T08:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Rename column in the Stats fuction with the values of the Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534090#M150940</link>
      <description>&lt;P&gt;Below may help&lt;/P&gt;&lt;P&gt;| timechart span=1w count by Customer | eval week=strftime(_time, "%U")&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 07:45:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534090#M150940</guid>
      <dc:creator>saravanan90</dc:creator>
      <dc:date>2020-12-25T07:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Rename column in the Stats fuction with the values of the Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534097#M150941</link>
      <description>&lt;P&gt;The command below are not working. It shows invalid argument.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=1w count by Customer&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 08:42:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534097#M150941</guid>
      <dc:creator>dashield</dc:creator>
      <dc:date>2020-12-25T08:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Rename column in the Stats fuction with the values of the Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534103#M150944</link>
      <description>&lt;P&gt;Please check if this helps .&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="saravanan90_1-1608888691028.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/12363iB6947A2975ABB877/image-size/medium?v=v2&amp;amp;px=400" role="button" title="saravanan90_1-1608888691028.png" alt="saravanan90_1-1608888691028.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 09:32:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534103#M150944</guid>
      <dc:creator>saravanan90</dc:creator>
      <dc:date>2020-12-25T09:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rename column in the Stats fuction with the values of the Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534106#M150945</link>
      <description>&lt;P&gt;Thanks a lot. The result is what I need.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 12:27:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rename-column-in-the-Stats-fuction-with-the-values-of-the-Field/m-p/534106#M150945</guid>
      <dc:creator>dashield</dc:creator>
      <dc:date>2020-12-25T12:27:38Z</dc:date>
    </item>
  </channel>
</rss>

