<?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: count events from a radio button choice issue in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382653#M167521</link>
    <description>&lt;P&gt;@jip31,&lt;/P&gt;

&lt;P&gt;Change your search to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="windows" sourcetype="wineventlog:*" "SourceName=Application Error"  EventCode=$EventCode$   | stats count by EventCode
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By &lt;CODE&gt;dc(EventCode)&lt;/CODE&gt; in your original search, you  are counting only the distinct values of EventCode which is always 1 since you are selecting 1 event code from the radio button&lt;/P&gt;</description>
    <pubDate>Sat, 15 Sep 2018 11:45:05 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2018-09-15T11:45:05Z</dc:date>
    <item>
      <title>count events from a radio button choice issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382650#M167518</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;I use the code below in order to display the events corresponding to these event code&lt;BR /&gt;
    index="windows" sourcetype="wineventlog:*" "SourceName=Application Error"  (EventCode=1000 OR EventCode =1001 OR EventCode =1002 OR EventCode =1 OR EventCode =2)  |  dedup _time|table _time host EventCode Type Message&lt;/P&gt;

&lt;P&gt;The code returns 4 events&lt;BR /&gt;
I want to do the same thing from a radio button choice&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="windows" sourcetype="wineventlog:*" "SourceName=Application Error"  (EventCode=1000 OR EventCode =1001 OR EventCode =1002 OR EventCode =1 OR EventCode =2 EventCode=$EventCode$ )  | stats dc(EventCode)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it returns me only 1 event but normally with the selection I make on the radio button i should have 4 events&lt;BR /&gt;
What i have to do please??&lt;BR /&gt;
THANKS&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 07:15:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382650#M167518</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-09-15T07:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: count events from a radio button choice issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382651#M167519</link>
      <description>&lt;P&gt;@jip31,&lt;BR /&gt;
What's in your radio buttons? Are they event codes?  In the above search an &lt;CODE&gt;OR&lt;/CODE&gt; between "EventCode =2 EventCode=$EventCode$ " is missing. Is it a typo? Hows your final result should look like?&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 07:30:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382651#M167519</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-09-15T07:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: count events from a radio button choice issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382652#M167520</link>
      <description>&lt;P&gt;I have 5 button: 1000, 1001, 1002, 1, 2&lt;BR /&gt;
When I click on the button i want that my request count the number of events with the event code 1000, the number of events with the number 1001 etc....&lt;BR /&gt;
So i just want a column with the name of the event code and a column with the count of event linked to the event code&lt;BR /&gt;
To my mind its normal there is no OR because EventCode=$EventCode$ is the just the name of my button radio panel&lt;BR /&gt;
Actually my request just count the number of 1000 (so always 1...) and not the event number with the event code 1000&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 09:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382652#M167520</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-09-15T09:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: count events from a radio button choice issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382653#M167521</link>
      <description>&lt;P&gt;@jip31,&lt;/P&gt;

&lt;P&gt;Change your search to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="windows" sourcetype="wineventlog:*" "SourceName=Application Error"  EventCode=$EventCode$   | stats count by EventCode
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;By &lt;CODE&gt;dc(EventCode)&lt;/CODE&gt; in your original search, you  are counting only the distinct values of EventCode which is always 1 since you are selecting 1 event code from the radio button&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 11:45:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382653#M167521</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-09-15T11:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: count events from a radio button choice issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382654#M167522</link>
      <description>&lt;P&gt;RENJITH&lt;BR /&gt;
it doesnt works&lt;BR /&gt;
I have always one event&lt;BR /&gt;
1,000 is dusplayed instead 1....&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 15:41:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382654#M167522</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-09-15T15:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: count events from a radio button choice issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382655#M167523</link>
      <description>&lt;P&gt;Is it possible to share your xml? Mask any sensitive data&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 16:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382655#M167523</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-09-15T16:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: count events from a radio button choice issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382656#M167524</link>
      <description>&lt;P&gt;In fact now I have 1000 instead 1&lt;BR /&gt;
please find the xml here :&lt;BR /&gt;
&lt;A href="https://cjoint.com/c/HIqfSrT4MXd"&gt;https://cjoint.com/c/HIqfSrT4MXd&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Sun, 16 Sep 2018 05:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382656#M167524</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-09-16T05:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: count events from a radio button choice issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382657#M167525</link>
      <description>&lt;P&gt;@jip31,, Sorry I could not understand the xml due to formatting. Nevertheless, hows your  output result should like ?&lt;BR /&gt;
When you select  "1000" as radio button option, then it should display&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EventCode Count
1000              1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; EventCode Count
   1000           Some Values (Total number of events for event code 1000)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or something else?&lt;/P&gt;</description>
      <pubDate>Sun, 16 Sep 2018 10:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-events-from-a-radio-button-choice-issue/m-p/382657#M167525</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-09-16T10:38:22Z</dc:date>
    </item>
  </channel>
</rss>

