<?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 do you Timechart by multiple fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-Timechart-by-multiple-fields/m-p/420292#M120815</link>
    <description>&lt;P&gt;You have to create an aggregate field like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" base_search 
| rex "\\\\\"country\\\\\":\\\\\"(?&amp;lt;country&amp;gt;\w+)\\\\\"" 
| rex "\\\\\"scheme\\\\\":\\\\\"(?&amp;lt;scheme&amp;gt;\w+)\\\\\"" 
| eval country_scheme = country . ":" . scheme
| timechart count BY country_scheme
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 08 Oct 2018 22:21:04 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2018-10-08T22:21:04Z</dc:date>
    <item>
      <title>How do you Timechart by multiple fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-Timechart-by-multiple-fields/m-p/420291#M120814</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm struggling with the below query "presentable" in a dashboard. Initially, my idea was to have time on the x-axis, and the count of events on the y-axis, and columns for each scheme stacking the countries (if that makes sense, I thought could be a viable visualization) but can't make it work although the search gives the correct values&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" base_search 
| rex field=_raw "\\\\\"country\\\\\":\\\\\"(?&amp;lt;country&amp;gt;\w+)\\\\\"" 
| rex field=_raw "\\\\\"scheme\\\\\":\\\\\"(?&amp;lt;scheme&amp;gt;\w+)\\\\\"" 
| stats count by country, scheme
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 08 Oct 2018 22:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-Timechart-by-multiple-fields/m-p/420291#M120814</guid>
      <dc:creator>Esperteyu</dc:creator>
      <dc:date>2018-10-08T22:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do you Timechart by multiple fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-Timechart-by-multiple-fields/m-p/420292#M120815</link>
      <description>&lt;P&gt;You have to create an aggregate field like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" base_search 
| rex "\\\\\"country\\\\\":\\\\\"(?&amp;lt;country&amp;gt;\w+)\\\\\"" 
| rex "\\\\\"scheme\\\\\":\\\\\"(?&amp;lt;scheme&amp;gt;\w+)\\\\\"" 
| eval country_scheme = country . ":" . scheme
| timechart count BY country_scheme
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Oct 2018 22:21:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-Timechart-by-multiple-fields/m-p/420292#M120815</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-10-08T22:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you Timechart by multiple fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-Timechart-by-multiple-fields/m-p/420293#M120816</link>
      <description>&lt;P&gt;An alternative to &lt;CODE&gt;| eval country_scheme = country . ":" . scheme&lt;/CODE&gt; is to use strcat:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| strcat country ":" scheme country_scheme
| timechart count BY country_scheme
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Oct 2019 02:25:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-Timechart-by-multiple-fields/m-p/420293#M120816</guid>
      <dc:creator>rojyates</dc:creator>
      <dc:date>2019-10-25T02:25:02Z</dc:date>
    </item>
  </channel>
</rss>

