<?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 How do I use a different aggregator based on a token? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-use-a-different-aggregator-based-on-a-token/m-p/372346#M24320</link>
    <description>&lt;P&gt;I have this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... 
| rename value as "Response Time"
| timechart span=1m max("Response Time") by app_name limit=5 useother=false usenull=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I'd like to allow 'max("Response Time")' to change to 'avg("Response Time")' depending on user input.  Is there a way to do this?&lt;/P&gt;

&lt;P&gt;I've tried $token$("Response Time") but that doesn't work.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jun 2017 15:53:40 GMT</pubDate>
    <dc:creator>sillingworth</dc:creator>
    <dc:date>2017-06-27T15:53:40Z</dc:date>
    <item>
      <title>How do I use a different aggregator based on a token?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-use-a-different-aggregator-based-on-a-token/m-p/372346#M24320</link>
      <description>&lt;P&gt;I have this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... 
| rename value as "Response Time"
| timechart span=1m max("Response Time") by app_name limit=5 useother=false usenull=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I'd like to allow 'max("Response Time")' to change to 'avg("Response Time")' depending on user input.  Is there a way to do this?&lt;/P&gt;

&lt;P&gt;I've tried $token$("Response Time") but that doesn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 15:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-use-a-different-aggregator-based-on-a-token/m-p/372346#M24320</guid>
      <dc:creator>sillingworth</dc:creator>
      <dc:date>2017-06-27T15:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a different aggregator based on a token?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-use-a-different-aggregator-based-on-a-token/m-p/372347#M24321</link>
      <description>&lt;P&gt;Here's how I've done it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        ...
        | stats max(value) as PerMinMax, avg(value) as PerMinAvg by _time, app_name
        | eval "Response Time"=case("Average"=="Max", PerMinMax, "Average"=="Average", PerMinAvg) 
        | timechart span=1m max("Response Time") by app_name limit=5 useother=false usenull=false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Jun 2017 10:03:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-do-I-use-a-different-aggregator-based-on-a-token/m-p/372347#M24321</guid>
      <dc:creator>sillingworth</dc:creator>
      <dc:date>2017-06-28T10:03:23Z</dc:date>
    </item>
  </channel>
</rss>

