<?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: Apply the same query to multiple days given day interval in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711694#M240220</link>
    <description>&lt;P&gt;Ok. If your initial stats doesn't include _time field, there's nothing to bin. That's why you're getting no results.&lt;/P&gt;</description>
    <pubDate>Sat, 15 Feb 2025 12:06:27 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-02-15T12:06:27Z</dc:date>
    <item>
      <title>Apply the same query to multiple days given day interval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711617#M240205</link>
      <description>&lt;P&gt;Hi everyone.&lt;BR /&gt;&lt;BR /&gt;I have a query that calculates a number of metrics, such as average, max value, etc, for a specific date, given an interval from a dropdown menu. All the metrics are then output in a table, in which a row represents one day and the columns are the metrics itself.&lt;BR /&gt;I need to apply the same query to a number of days given an interval and output the result of each day as a new row on the column. For example, if the user queries through the past 5 days, I need five rows, each with the metrics associated only to the data from that day.&lt;BR /&gt;&lt;BR /&gt;How could I do this?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 15:03:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711617#M240205</guid>
      <dc:creator>pedropiin</dc:creator>
      <dc:date>2025-02-14T15:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Apply the same query to multiple days given day interval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711620#M240206</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/276496"&gt;@pedropiin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you have to run something like this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| bin span=1d _time
| stats 
     sum(metric1) AS metric1
     sum(metric2) AS metric2
     sum(metric3) AS metric3
     BY day&lt;/LI-CODE&gt;&lt;P&gt;I could be more detailed is you share more information about your data.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 15:07:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711620#M240206</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-02-14T15:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Apply the same query to multiple days given day interval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711629#M240207</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;.&amp;nbsp;Thank you for your answer&lt;BR /&gt;&lt;BR /&gt;But it doesn't seem to work...&lt;BR /&gt;Unfortunately I can't share information as it is sensitive, but it goes along the line of what you used as an example.&lt;BR /&gt;&lt;BR /&gt;My whole query is of the form:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index ...
| stats ...
| eval var1=...
| eval var2=...
| sort var2
| eval var3=...
| bin_time span=1d
| stats(count(condition)) as count_var by day&lt;/LI-CODE&gt;&lt;P&gt;But it doesn't seem to work. I've already tried both with one day and with a bigger interval, but they all result in "No results found".&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can guarantee that this query should return results because when I run it for only day without the "bin" command, it gives me the correct answer.&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 16:54:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711629#M240207</guid>
      <dc:creator>pedropiin</dc:creator>
      <dc:date>2025-02-14T16:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Apply the same query to multiple days given day interval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711671#M240217</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/276496"&gt;@pedropiin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you stats and bin statemets are wrong, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search&amp;gt;
| bin span=1d _time
| eval var1=...
| eval var2=...
| sort var2
| eval var3=...
| stats 
     count(var1) AS var1
     count(var2) AS var2
     count(var3) AS var3
     BY day&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;About sensitive information, you can mask them, for me it's interesting only the event structure and the field extractions.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2025 08:11:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711671#M240217</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-02-15T08:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Apply the same query to multiple days given day interval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711694#M240220</link>
      <description>&lt;P&gt;Ok. If your initial stats doesn't include _time field, there's nothing to bin. That's why you're getting no results.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Feb 2025 12:06:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Apply-the-same-query-to-multiple-days-given-day-interval/m-p/711694#M240220</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-02-15T12:06:27Z</dc:date>
    </item>
  </channel>
</rss>

