<?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 write Timechart for search with binary value result? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632673#M219795</link>
    <description>&lt;P&gt;When you do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval modeBool = if(mode!=None, "mode_true", "mode_false")&lt;/LI-CODE&gt;&lt;P&gt;You are comparing field mode to the field None, which I guess does not exist, so ALL your events will be mode_false. Quote the "None"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=mode_qa module=mode_producer_logs "telemetry event" 
| extract pairdelim="\"{,}" kvdelim=":" 
| eval modeBool = if(mode!="None", "mode_true", "mode_false")
| timechart count by modeBool span=30m&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 22:28:31 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2023-02-28T22:28:31Z</dc:date>
    <item>
      <title>How to write Timechart for search with binary value result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632664#M219790</link>
      <description>&lt;P&gt;Hi I have a field,&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;mode&lt;/STRONG&gt;&lt;/EM&gt;, which returns either returns data or is None&amp;nbsp;&lt;STRONG&gt;(&lt;EM&gt;mode_true, mode_false&lt;/EM&gt;).&lt;/STRONG&gt; I'm trying to search and aggregate the sum [over time] of both outcomes over separately then plot both on a timechart (as a stacked bar or similar, where the data is separated categorically). I've tried a couple query types below with no luck&lt;BR /&gt;&lt;BR /&gt;1.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=mode_qa module=mode_producer_logs "telemetry_event" 
| extract pairdelim="\"{,}" kvdelim=":" 
| multisearch [search mode!=None | eval type="mode_true"] [search mode=None | eval type="mode_false"]
| timechart span=60m count(mode) by type&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=mode_qa module=mode_producer_logs "telemetry event" 
| extract pairdelim="\"{,}" kvdelim=":" 
| eval modeBool = if(mode!=None, "mode_true", "mode_false")
| timechart count by modeBool span=30m&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both display a visual with only one data source (not binary, e.g. mode_true vs mode_false). Any ideas? New to Splunk&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 22:07:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632664#M219790</guid>
      <dc:creator>mrf23</dc:creator>
      <dc:date>2023-02-28T22:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Timechart for search with binary value result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632666#M219791</link>
      <description>&lt;P&gt;Please explain what you mean by "no luck".&amp;nbsp; How do the results returned not meet expectations?&lt;/P&gt;&lt;P&gt;The second query looks like it should work, but perhaps there's an error we can see without knowing the data.&lt;/P&gt;&lt;P&gt;You can debug the query by running it one pipe at a time, verifying the results are expected before adding the next pipe.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 22:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632666#M219791</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-28T22:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Timechart for search with binary value result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632671#M219793</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;Right, I put the resulting behavior at the bottom of my post -- &lt;EM&gt;"Both display a visual with only one data source (not binary, e.g. mode_true vs mode_false). "&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;I'm trying to display the binary outcomes as a categorical visual like a stacked bar, but the only result I see is a single bar for a given time point.&lt;BR /&gt;&lt;BR /&gt;I believe the problem is with the eval-if statement - any idea on correct syntax for expected behavior?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 22:21:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632671#M219793</guid>
      <dc:creator>mrf23</dc:creator>
      <dc:date>2023-02-28T22:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Timechart for search with binary value result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632672#M219794</link>
      <description>&lt;P&gt;eval-if in #2. Not sure about the multisearch&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 22:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632672#M219794</guid>
      <dc:creator>mrf23</dc:creator>
      <dc:date>2023-02-28T22:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Timechart for search with binary value result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632673#M219795</link>
      <description>&lt;P&gt;When you do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval modeBool = if(mode!=None, "mode_true", "mode_false")&lt;/LI-CODE&gt;&lt;P&gt;You are comparing field mode to the field None, which I guess does not exist, so ALL your events will be mode_false. Quote the "None"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=mode_qa module=mode_producer_logs "telemetry event" 
| extract pairdelim="\"{,}" kvdelim=":" 
| eval modeBool = if(mode!="None", "mode_true", "mode_false")
| timechart count by modeBool span=30m&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 22:28:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-Timechart-for-search-with-binary-value-result/m-p/632673#M219795</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-02-28T22:28:31Z</dc:date>
    </item>
  </channel>
</rss>

