<?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 use token value in stats group by field in Splunk dashboard in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/689915#M235041</link>
    <description>&lt;P&gt;Assuming you are changing the groupby_field token in the change handler of the time selection input, which is essentially the input that is being waited for, you could also initialise the groupby_field token in an init block in SimpleXML - it is perhaps a little more complicated to do in Studio&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2024 06:53:37 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-06-07T06:53:37Z</dc:date>
    <item>
      <title>How to use token value in stats group by field in Splunk dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/689907#M235039</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I have stats group by fields as token it will change dynamically based on time selection. for example if select since 1st Jun 24 then my query will be like below.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;eventtype="abc" |stats count by a,b,c&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;and if select date before 1st Jun 2024 i.e 30th May 2024 i would like to have stats group by field like below.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;eventtype="abc" |stats count by a,d,e&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So my current implementation is putting group by field in token, token will be set based on time selection and final query would be like below.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;eventtype="abc" |stats count by $groupby_field$&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Now the issue is splunk dashboard says waiting for input the moment i add token input to stats groupby field.&lt;/P&gt;&lt;P&gt;Appreciate your suggestion/help to handle this scenario.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 05:48:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/689907#M235039</guid>
      <dc:creator>kasimanikandan</dc:creator>
      <dc:date>2024-06-07T05:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token value in stats group by field in Splunk dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/689915#M235041</link>
      <description>&lt;P&gt;Assuming you are changing the groupby_field token in the change handler of the time selection input, which is essentially the input that is being waited for, you could also initialise the groupby_field token in an init block in SimpleXML - it is perhaps a little more complicated to do in Studio&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 06:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/689915#M235041</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-06-07T06:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token value in stats group by field in Splunk dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/690293#M235120</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;didnt worked&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 03:24:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/690293#M235120</guid>
      <dc:creator>kasimanikandan</dc:creator>
      <dc:date>2024-06-11T03:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use token value in stats group by field in Splunk dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/690306#M235128</link>
      <description>&lt;P&gt;That sort of response is unlikely to elicit further help from anyone.&lt;/P&gt;&lt;P&gt;Please describe what you have done, and if possible post snippets of your token management logic in your dashboard&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 07:12:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-token-value-in-stats-group-by-field-in-Splunk/m-p/690306#M235128</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-06-11T07:12:11Z</dc:date>
    </item>
  </channel>
</rss>

