<?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 Stats Auto Bin Time in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Auto-Bin-Time/m-p/669250#M54766</link>
    <description>&lt;P&gt;I have created a dashboard in dashboard studio. I have a table visualization, see my code below.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So, the "Time" column auto sets my | bin to one minute. When I update my timepicker to say the last 7 days it still shows the time |bin as one minute.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I dynamically change the |bin to best fit my timepicker selection?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search cat IN ($t_endpoint$) AND Car IN ($t_car$)
| eval Time=strftime(_time,"%Y-%m-%d-%I:%M %p")
| stats limit=15 sum(Numbercat) as Numbercat, avg(catTime) as AvgcatSecs by Time, Car, cat&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2023 20:15:37 GMT</pubDate>
    <dc:creator>MrJohn230</dc:creator>
    <dc:date>2023-11-20T20:15:37Z</dc:date>
    <item>
      <title>Stats Auto Bin Time</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Auto-Bin-Time/m-p/669250#M54766</link>
      <description>&lt;P&gt;I have created a dashboard in dashboard studio. I have a table visualization, see my code below.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So, the "Time" column auto sets my | bin to one minute. When I update my timepicker to say the last 7 days it still shows the time |bin as one minute.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I dynamically change the |bin to best fit my timepicker selection?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search cat IN ($t_endpoint$) AND Car IN ($t_car$)
| eval Time=strftime(_time,"%Y-%m-%d-%I:%M %p")
| stats limit=15 sum(Numbercat) as Numbercat, avg(catTime) as AvgcatSecs by Time, Car, cat&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 20:15:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Auto-Bin-Time/m-p/669250#M54766</guid>
      <dc:creator>MrJohn230</dc:creator>
      <dc:date>2023-11-20T20:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Auto Bin Time</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Auto-Bin-Time/m-p/669260#M54769</link>
      <description>&lt;P&gt;Converting the time to a string is a peculiar way to do binning. I'd rather simply use the bin command with a proper set of parameters for binning.&lt;/P&gt;&lt;P&gt;If you want to display your time in a human-readable form you can still do fieldformat.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 22:11:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Auto-Bin-Time/m-p/669260#M54769</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-11-20T22:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Auto Bin Time</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Auto-Bin-Time/m-p/669357#M54781</link>
      <description>&lt;P&gt;This is what worked for me. I added a TimeBucket dropdown box and created a token.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search cat IN ($t_endpoint$) AND Car IN ($t_car$)
|bin _time span=$t_bin$
| stats limit=15 sum(Numbercat) as Numbercat, avg(catTime) as AvgcatSecs by _time, Car, cat
| eval Time=strftime(_time,"%Y-%m-%d-%I:%M %p")
|fields - _time
|fields Time, Numbercat&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 15:52:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Auto-Bin-Time/m-p/669357#M54781</guid>
      <dc:creator>MrJohn230</dc:creator>
      <dc:date>2023-11-21T15:52:06Z</dc:date>
    </item>
  </channel>
</rss>

