<?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 separate rows as column? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378956#M111062</link>
    <description>&lt;P&gt;Hi Apple143,&lt;/P&gt;

&lt;P&gt;Would you mind posting this as a new question since it is a separate question?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 03:32:24 GMT</pubDate>
    <dc:creator>jluo_splunk</dc:creator>
    <dc:date>2018-06-14T03:32:24Z</dc:date>
    <item>
      <title>How to separate rows as column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378949#M111055</link>
      <description>&lt;P&gt;I have trouble in manipulating the table&lt;/P&gt;

&lt;P&gt;Date contains (index, name, date).&lt;/P&gt;

&lt;P&gt;name .....  date ................  count&lt;BR /&gt;
a     ............                  2018-06-07   .....        500&lt;BR /&gt;
a     ............                  2018-06-08  .....         600&lt;BR /&gt;
b     ............                  2018-06-07  .....         700&lt;BR /&gt;
b      ............                 2018-06-08 .....          800&lt;BR /&gt;
c      ............                 2018-06-07  .....         900&lt;BR /&gt;
c      ............                 2018-06-08    .....       1000&lt;/P&gt;

&lt;P&gt;I want to make this table to below form&lt;/P&gt;

&lt;P&gt;name     ........         day1       ........                 day2&lt;BR /&gt;
a        ...............   500   ..........  600&lt;BR /&gt;
b        ...............       700         ..........        800&lt;BR /&gt;
c         ...............      900   ..........  1000&lt;/P&gt;

&lt;P&gt;or it doesn't matter if I can make below table directly(using tstats)&lt;/P&gt;

&lt;P&gt;I have to use tstats. I already made an Alert that could show table like second table.&lt;BR /&gt;
But, It takes too much time so I want to change search command using tstats&lt;/P&gt;

&lt;P&gt;And here is the search query that I used when I made first table&lt;BR /&gt;
| tstats count where index=* by name, _time span=1d)&lt;/P&gt;

&lt;P&gt;How can I do?&lt;BR /&gt;
Somebody help me please.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 22:53:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378949#M111055</guid>
      <dc:creator>apple143</dc:creator>
      <dc:date>2018-06-08T22:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate rows as column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378950#M111056</link>
      <description>&lt;P&gt;Hi Apple143, &lt;/P&gt;

&lt;P&gt;Does this work for you?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=* by name, _time span=1d prestats=true
| chart count by name, _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Jun 2018 00:43:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378950#M111056</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2018-06-09T00:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate rows as column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378951#M111057</link>
      <description>&lt;P&gt;@jluo, small correction _time needs to be converted from epoch time to Epoch time of format YYYY-MM-DD&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats count where index=* by name, _time span=1d prestats=true
 | eval Time=strftime(_time,"%Y/%m/%d")
 | chart count by name, Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Jun 2018 15:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378951#M111057</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-06-09T15:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate rows as column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378952#M111058</link>
      <description>&lt;P&gt;Nice catch, Niketnilay &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; @apple143, if this works for you, can you accept the answer?&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jun 2018 19:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378952#M111058</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2018-06-10T19:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate rows as column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378953#M111059</link>
      <description>&lt;P&gt;It works! Thanks a lot!!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 01:23:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378953#M111059</guid>
      <dc:creator>apple143</dc:creator>
      <dc:date>2018-06-11T01:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate rows as column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378954#M111060</link>
      <description>&lt;P&gt;I checked it. Your correction makes it easier. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 01:24:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378954#M111060</guid>
      <dc:creator>apple143</dc:creator>
      <dc:date>2018-06-11T01:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate rows as column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378955#M111061</link>
      <description>&lt;P&gt;Can I ask one more?&lt;BR /&gt;
What if I want to 1 more field?&lt;BR /&gt;
Like..&lt;BR /&gt;
A-------xx-------06/07-------100&lt;BR /&gt;
A-------xx-------06/08-------200&lt;BR /&gt;
A-------yy-------06/07-------300&lt;BR /&gt;
A-------yy-------06/08-------400&lt;BR /&gt;
B-------xx-------06/07-------500&lt;BR /&gt;
B-------xx-------06/08-------600&lt;/P&gt;

&lt;P&gt;to&lt;/P&gt;

&lt;P&gt;A-------xx-------100-------200&lt;BR /&gt;
A-------yy-------300-------400&lt;BR /&gt;
B-------xx-------500-------600&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 07:28:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378955#M111061</guid>
      <dc:creator>apple143</dc:creator>
      <dc:date>2018-06-13T07:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate rows as column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378956#M111062</link>
      <description>&lt;P&gt;Hi Apple143,&lt;/P&gt;

&lt;P&gt;Would you mind posting this as a new question since it is a separate question?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 03:32:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-separate-rows-as-column/m-p/378956#M111062</guid>
      <dc:creator>jluo_splunk</dc:creator>
      <dc:date>2018-06-14T03:32:24Z</dc:date>
    </item>
  </channel>
</rss>

