<?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 table events in columns with time/date related counts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417367#M120089</link>
    <description>&lt;H1&gt;Update&lt;/H1&gt;

&lt;P&gt;So with a high cardinality field where timechart won't work you can use a straight stats then xyseries.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=data | stats count by user, date | xyseries user date count&lt;/CODE&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;H1&gt;Previous Answer&lt;/H1&gt;

&lt;P&gt;Take a look at timechart. It creates this exact set of data but transposed; the fields are in the columns and the times in the rows.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jun 2019 16:48:44 GMT</pubDate>
    <dc:creator>badarsebard</dc:creator>
    <dc:date>2019-06-10T16:48:44Z</dc:date>
    <item>
      <title>How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417366#M120088</link>
      <description>&lt;P&gt;I want to write a search where the events are in one column and the related counts are in each column corresponding to the date, something like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;         01/01/18        01/02/18        01/03/18         .......             01/29/18         01/30/18
userid1  3               5               30                                   8                41
userid2  5               88              10                                   7                8
userid3  45              78              7                                    8                2  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jun 2019 15:41:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417366#M120088</guid>
      <dc:creator>ankurtaunk</dc:creator>
      <dc:date>2019-06-10T15:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417367#M120089</link>
      <description>&lt;H1&gt;Update&lt;/H1&gt;

&lt;P&gt;So with a high cardinality field where timechart won't work you can use a straight stats then xyseries.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=data | stats count by user, date | xyseries user date count&lt;/CODE&gt;&lt;/P&gt;

&lt;HR /&gt;

&lt;H1&gt;Previous Answer&lt;/H1&gt;

&lt;P&gt;Take a look at timechart. It creates this exact set of data but transposed; the fields are in the columns and the times in the rows.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 16:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417367#M120089</guid>
      <dc:creator>badarsebard</dc:creator>
      <dc:date>2019-06-10T16:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417368#M120090</link>
      <description>&lt;P&gt;The problem is - there are millions of userID and I do not want them in column. I am good if I have millions of rows than column.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 16:50:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417368#M120090</guid>
      <dc:creator>ankurtaunk</dc:creator>
      <dc:date>2019-06-10T16:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417369#M120091</link>
      <description>&lt;P&gt;@ankurtaunk try the following run anywhere example to see if it fits your needs&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd log_level!=INFO earliest=-7d@d latest=now
| eval Time=strftime(_time,"%Y/%m/%d")
| chart count as Error by component Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jun 2019 17:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417369#M120091</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-06-10T17:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417370#M120092</link>
      <description>&lt;P&gt;In that case you'll need xyseries. I'll update answer with example.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 17:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417370#M120092</guid>
      <dc:creator>badarsebard</dc:creator>
      <dc:date>2019-06-10T17:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417371#M120093</link>
      <description>&lt;P&gt;@ankurtaunk&lt;BR /&gt;
You can use chart command , try below-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt;| bin span=1d _time | eval date=strftime(_time,"%Y-%m-%d")| chart count over users by date
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jun 2019 17:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417371#M120093</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-06-10T17:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417372#M120094</link>
      <description>&lt;P&gt;Not all the dates are coming . After 10 days, I see colum with "Others". IS this Splunk's limitation that after certain colum it shows others ?&lt;/P&gt;

&lt;P&gt;I do not think, there is any issue qith query though. Can anyone please suggest  ?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 18:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417372#M120094</guid>
      <dc:creator>ankurtaunk</dc:creator>
      <dc:date>2019-06-10T18:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417373#M120095</link>
      <description>&lt;P&gt;Your query is working fine and giving all the column. Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 18:43:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417373#M120095</guid>
      <dc:creator>ankurtaunk</dc:creator>
      <dc:date>2019-06-10T18:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417374#M120096</link>
      <description>&lt;P&gt;@ankurtaunk Yes by default limit for timechart and chart is 10 results. You can use limit=0 option with chart and try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt;| bin span=1d _time | eval date=strftime(_time,"%Y-%m-%d")| chart count over users by date limit=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Jun 2019 18:45:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417374#M120096</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2019-06-10T18:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to table events in columns with time/date related counts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417375#M120097</link>
      <description>&lt;P&gt;This works too. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 20:42:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-table-events-in-columns-with-time-date-related-counts/m-p/417375#M120097</guid>
      <dc:creator>ankurtaunk</dc:creator>
      <dc:date>2019-06-11T20:42:59Z</dc:date>
    </item>
  </channel>
</rss>

