<?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 Split a column in the search data into multiple columns in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300439#M163753</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have a file of Tickets to analyse. I want to arrange the data as per the following image. What can I do to achieve the same.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4129iEEC7BF13F3A918A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2018 13:04:52 GMT</pubDate>
    <dc:creator>shiv1593</dc:creator>
    <dc:date>2018-01-10T13:04:52Z</dc:date>
    <item>
      <title>Split a column in the search data into multiple columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300439#M163753</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have a file of Tickets to analyse. I want to arrange the data as per the following image. What can I do to achieve the same.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4129iEEC7BF13F3A918A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 13:04:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300439#M163753</guid>
      <dc:creator>shiv1593</dc:creator>
      <dc:date>2018-01-10T13:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Split a column in the search data into multiple columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300440#M163754</link>
      <description>&lt;P&gt;Hi shiv1593,&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| chart sum(number) AS number OVER region BY priority
| addtotals
| addcoltotals labelfield=region
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 15:05:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300440#M163754</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-10T15:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Split a column in the search data into multiple columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300441#M163755</link>
      <description>&lt;P&gt;Hi Giuseppe,&lt;/P&gt;

&lt;P&gt;I tried. It didn't work. I am fairly new to Splunk, can you look at my query with your query added and see whether am I doing something wrong?&lt;/P&gt;

&lt;P&gt;host="service_desk_tickets" Number="&lt;EM&gt;" Region="&lt;/EM&gt;" Priority="*" &lt;BR /&gt;
| eval Region = upper(Region)&lt;BR /&gt;
| stats count(Number) by Region Priority&lt;BR /&gt;
| rename count(Number) as "Total"&lt;BR /&gt;
| chart sum(Number) AS Number OVER Region BY Priority&lt;BR /&gt;
| addtotals&lt;BR /&gt;
| addcoltotals labelfield=Region&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:36:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300441#M163755</guid>
      <dc:creator>shiv1593</dc:creator>
      <dc:date>2020-09-29T17:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Split a column in the search data into multiple columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300442#M163756</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
the field in sum must be the one in the previous stats (rename for you):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="service_desk_tickets" Number="*" Region="*" Priority="*" 
| eval Region = upper(Region)
| stats count(Number) AS Number by Region Priority
| chart sum(Number) AS Number OVER Region BY Priority
| addtotals
| addcoltotals labelfield=Region
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Only few hints:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;when you share a code use Code Sample button (icon 101010), otherwise some char isn't correctly showed,&lt;/LI&gt;
&lt;LI&gt;use always index=index_name because search is quicker,&lt;/LI&gt;
&lt;LI&gt;put rename in stats,&lt;/LI&gt;
&lt;LI&gt;don't use Total as field name because it's the same used in addcoltotals command.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 15:32:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300442#M163756</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-10T15:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Split a column in the search data into multiple columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300443#M163757</link>
      <description>&lt;P&gt;Thanks a lot, Giuseppe. That was really helpful. I will take into account your tips.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 15:42:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Split-a-column-in-the-search-data-into-multiple-columns/m-p/300443#M163757</guid>
      <dc:creator>shiv1593</dc:creator>
      <dc:date>2018-01-10T15:42:26Z</dc:date>
    </item>
  </channel>
</rss>

