<?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 achieve to _time filter with transpose? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621624#M14585</link>
    <description>&lt;P&gt;You mean no results?&lt;BR /&gt;&lt;BR /&gt;Maybe you used it "too late". As we use _time to retrieve the "hour", the _time field of course still has to be in the resultset.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try to use it in this location of the SPL:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; `index_mes` sourcetype="web_request"  
| timechart span=30m count as "6 - CP - Nombre de temps de réponse &amp;gt; 10 sec"
| eval time=strftime(_time,"%d-%m %H:%M") 
| eval hour=strftime(_time, "%H")
| where hour&amp;gt;=6 AND hour&amp;lt;=18
| sort time 
| fields - _time _span _origtime _events hour
| fillnull value=0 
| transpose 0 header_field=time column_name=KPI include_empty=true 
| sort + KPI&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 21 Nov 2022 20:57:01 GMT</pubDate>
    <dc:creator>rnowitzki</dc:creator>
    <dc:date>2022-11-21T20:57:01Z</dc:date>
    <item>
      <title>How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621265#M14538</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;I use a search&amp;nbsp; thats transpose events with span of 30 m&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jip31_0-1668696954731.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22538iD53E3C44A14671B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="jip31_0-1668696954731.png" alt="jip31_0-1668696954731.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the end of the search is this one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where _time &amp;lt;= now() AND _time &amp;gt;= now()-14400 
| eval time=strftime(_time,"%H:%M") 
| sort time 
| fields - _time _span _origtime _events 
| fillnull value=0 
| transpose 0 header_field=time column_name=KPI include_empty=true 
| sort + KPI&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;as you can see, I just display events which exist in a specific time range&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where _time &amp;lt;= now() AND _time &amp;gt;= now()-14400 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine but just when the timepicker choice is "today"&lt;/P&gt;&lt;P&gt;I would like to do the same think on previous timepicker choice like "last 7 days" or "last 30 days"&lt;/P&gt;&lt;P&gt;Could you help please?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 06:41:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621265#M14538</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-11-18T06:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621354#M14540</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;It seems to work in general for me, independent of the timepicker setting (well, if you select less than 4 hours it will only show you events from the selected range or course).&lt;BR /&gt;&lt;BR /&gt;Can you show the first part of the search? Is there a timechart or something that groups by 30 min?&amp;nbsp;&lt;BR /&gt;Because when I use the given part of the search I get columns for each minute.&lt;BR /&gt;&lt;BR /&gt;Is there a reason why you filter the time range in the SPL instead of selecting&amp;nbsp; e.g. "last 4 hours"?&lt;/P&gt;&lt;P&gt;Ralph&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 08:58:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621354#M14540</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2022-11-18T08:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621362#M14541</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Yes there is a timechart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; `index_mes` sourcetype="web_request"  
| timechart span=30m count as "6 - CP - Nombre de temps de réponse &amp;gt; 10 sec" 
  ] 
| where _time &amp;lt;= now() AND _time &amp;gt;= now()-14400 
| eval time=strftime(_time,"%H:%M") 
| sort time 
| fields - _time _span _origtime _events 
| fillnull value=0 
| transpose 0 header_field=time column_name=KPI include_empty=true 
| sort + KPI&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 18 Nov 2022 09:56:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621362#M14541</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-11-18T09:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621508#M14568</link>
      <description>&lt;P&gt;Is anybody can help please?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 05:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621508#M14568</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-11-21T05:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621542#M14573</link>
      <description>&lt;P class="lia-align-left"&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P class="lia-align-left"&gt;Can you please give more details about your use case?&lt;BR /&gt;&lt;BR /&gt;I tested your SPL and it works in general. It gets into troubles when you set the time picker to several days.&amp;nbsp;&lt;BR /&gt;One limitation are the sort commands. (&lt;EM&gt;sort &lt;STRONG&gt;0&lt;/STRONG&gt; time&lt;/EM&gt; might help).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But in general I don't see a reason why you'd select events of 7d and then limit in in the search to 4 hours.&lt;BR /&gt;Is there a reason to limit time later, instead of using the time picker?&lt;BR /&gt;&lt;BR /&gt;Ralph&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 09:42:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621542#M14573</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2022-11-21T09:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621576#M14575</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Until now, I just was using this search for "Today" time range&lt;/P&gt;&lt;P&gt;Now I need to see the results on the period selected in the timepicker&lt;/P&gt;&lt;P&gt;Contrary to I said at the beginning, if I chose "Last 7days" for example, I can see all the results for this period&lt;/P&gt;&lt;P&gt;I have just replaced&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval time=strftime(_time,"%H:%M") &lt;/LI-CODE&gt;&lt;P&gt;by&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval time=strftime(_time,"%d-%m %H:%M") &lt;/LI-CODE&gt;&lt;P&gt;in order to see not only the hour but also the day concernend&lt;/P&gt;&lt;P&gt;So it gives me this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jip31_0-1669037065350.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22579iFF0F1758CEEAD6AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="jip31_0-1669037065350.png" alt="jip31_0-1669037065350.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now the last thing I want to do is to not display the events between 19:00 PM and 6 AM&lt;/P&gt;&lt;P&gt;It means I just need to display the events between 6:AM and 19:00 PM&lt;/P&gt;&lt;P&gt;Have you an idea please for doing this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:26:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621576#M14575</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-11-21T13:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621595#M14580</link>
      <description>&lt;P&gt;Ah ok, I understand now.&lt;BR /&gt;&lt;BR /&gt;You could throw away the irrelevant hours:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval hour=strftime(_time, "%H")
| where hour&amp;gt;=6 AND hour&amp;lt;=18&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 15:13:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621595#M14580</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2022-11-21T15:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621598#M14581</link>
      <description>&lt;P&gt;any results with this&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 15:27:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621598#M14581</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-11-21T15:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621624#M14585</link>
      <description>&lt;P&gt;You mean no results?&lt;BR /&gt;&lt;BR /&gt;Maybe you used it "too late". As we use _time to retrieve the "hour", the _time field of course still has to be in the resultset.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try to use it in this location of the SPL:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; `index_mes` sourcetype="web_request"  
| timechart span=30m count as "6 - CP - Nombre de temps de réponse &amp;gt; 10 sec"
| eval time=strftime(_time,"%d-%m %H:%M") 
| eval hour=strftime(_time, "%H")
| where hour&amp;gt;=6 AND hour&amp;lt;=18
| sort time 
| fields - _time _span _origtime _events hour
| fillnull value=0 
| transpose 0 header_field=time column_name=KPI include_empty=true 
| sort + KPI&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Nov 2022 20:57:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621624#M14585</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2022-11-21T20:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to achieve to _time filter with transpose?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621642#M14587</link>
      <description>&lt;P&gt;perfect thanks&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 05:19:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-achieve-to-time-filter-with-transpose/m-p/621642#M14587</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2022-11-22T05:19:19Z</dc:date>
    </item>
  </channel>
</rss>

