<?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: Branching in Splunk? (or another way to combine results into 1 table) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76667#M19399</link>
    <description>&lt;P&gt;[{"value":"2013-04-04","count":3760},...&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2013 17:08:04 GMT</pubDate>
    <dc:creator>motobeats</dc:creator>
    <dc:date>2013-06-28T17:08:04Z</dc:date>
    <item>
      <title>Branching in Splunk? (or another way to combine results into 1 table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76663#M19395</link>
      <description>&lt;P&gt;I have a search that generates a table with various stats (min, max, %-tile) all by &lt;CODE&gt;date_hour&lt;/CODE&gt;. Today I ran into an issue because one of my 'date_hours' only had a single "sample" (i.e. we only had hits at 6AM on 1 day out of 180, thus all my stats were the same). &lt;/P&gt;

&lt;P&gt;As a result, I would like to add a column for the result of "stats dc(date)" to help inform on the number of samples but can't figure out how to pipe one to the other. I can build each table separately which leads me to the question, can I do a branch and effectively send the result of a pipe to two pipes?&lt;/P&gt;

&lt;P&gt;These are the searches I am trying to combine into a single table but can't figure out how. Branching was just a thought. Other solutions welcome.&lt;/P&gt;

&lt;P&gt;Search 1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search)|stats dc(date) by date_hour
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search 2&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(search)|bucket _time span=1h|stats count by _time date_hour|stats min(count) as Min, p5(count) as "5th %-tile", p25(count) as "25th %-tile", p50(count) as "50th %-tile", p75(count) as "75th %-tile", p95(count) as "95th %-tile", max(count) as "Max" by date_hour
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jun 2013 23:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76663#M19395</guid>
      <dc:creator>motobeats</dc:creator>
      <dc:date>2013-06-26T23:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Branching in Splunk? (or another way to combine results into 1 table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76664#M19396</link>
      <description>&lt;P&gt;Not sure if understood what you are after very well, do you want to add to that table the number of days that some events happened?&lt;/P&gt;

&lt;P&gt;maybe this is what you want?&lt;/P&gt;

&lt;P&gt;stats max(A) min(A) dc(date_mday) by date_hour&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:10:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76664#M19396</guid>
      <dc:creator>asimagu</dc:creator>
      <dc:date>2020-09-28T14:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Branching in Splunk? (or another way to combine results into 1 table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76665#M19397</link>
      <description>&lt;P&gt;Ok. Let me give some searches to help me communicate better. I have this search&lt;BR /&gt;
(search)|stats dc(date) by date_hour&lt;BR /&gt;
and this search&lt;BR /&gt;
(search)|bucket _time span=1h|stats count by _time date_hour|stats min(count) as Min, p5(count) as "5th %-tile", p25(count) as "25th %-tile", p50(count) as "50th %-tile", p75(count) as "75th %-tile", p95(count) as "95th %-tile", max(count) as "Max" by date_hour&lt;BR /&gt;
But can't figure out how to combine them to give me a single table.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:11:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76665#M19397</guid>
      <dc:creator>motobeats</dc:creator>
      <dc:date>2020-09-28T14:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Branching in Splunk? (or another way to combine results into 1 table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76666#M19398</link>
      <description>&lt;P&gt;one more question, what is the format of your date field? that is not a field that I get on my logs. Do you see days, timestamps, something else? Maybe with that info I can see what you are after when doing a distinct count by date_hour&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 21:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76666#M19398</guid>
      <dc:creator>asimagu</dc:creator>
      <dc:date>2013-06-27T21:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Branching in Splunk? (or another way to combine results into 1 table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76667#M19399</link>
      <description>&lt;P&gt;[{"value":"2013-04-04","count":3760},...&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 17:08:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76667#M19399</guid>
      <dc:creator>motobeats</dc:creator>
      <dc:date>2013-06-28T17:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Branching in Splunk? (or another way to combine results into 1 table)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76668#M19400</link>
      <description>&lt;P&gt;Ok. Really simple answer to this one. Branching would be total overkill&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(search)|bucket _time span=1h|stats count by _time date_hour date|stats dc(date) as "Number of samples for this time period",min(count) as Min, p5(count) as "5th %-tile", p25(count) as "25th %-tile", p50(count) as "50th %-tile", p75(count) as "75th %-tile", p95(count) as "95th %-tile", max(count) as "Max" by date_hour
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Added date to the end of my first stats operation. This included a column with the date in my results which I could then d_count in the next statement. I realize now that I need to add any meta-data like information to the first operation if I want to use it later. &lt;/P&gt;

&lt;P&gt;I needed to add this column since a few date_hours had small numbers of samples thus providing misleading results.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 19:28:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Branching-in-Splunk-or-another-way-to-combine-results-into-1/m-p/76668#M19400</guid>
      <dc:creator>motobeats</dc:creator>
      <dc:date>2013-07-01T19:28:55Z</dc:date>
    </item>
  </channel>
</rss>

