<?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 query multiple conditions when the field name has a space in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-multiple-conditions-when-the-field-name-has-a-space/m-p/149690#M41888</link>
    <description>&lt;P&gt;Of course you can rename &lt;CODE&gt;Field 2&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=i source=s earliest=-7W@W latest=@W | rename "Field 2" as Field_2 | timechart span=1w count AS Overall count(eval(field1&amp;gt;0 )) AS F1Count count(eval(Field_2&amp;gt;0)) AS F2Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively you can use single quotes in &lt;CODE&gt;eval&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=i source=s earliest=-7W@W latest=@W | timechart span=1w count AS Overall count(eval(field1&amp;gt;0 )) AS F1Count count(eval('Field 2'&amp;gt;0)) AS F2Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Double quotes would make that a string that can't be compared with a number, causing that error.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jul 2014 23:08:13 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-07-18T23:08:13Z</dc:date>
    <item>
      <title>How to query multiple conditions when the field name has a space</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-multiple-conditions-when-the-field-name-has-a-space/m-p/149689#M41887</link>
      <description>&lt;P&gt;I need to run a query on the following lines:&lt;/P&gt;

&lt;P&gt;index=i source=s earliest=-7W@W latest=@W | timechart span=1w count AS Overall count(eval(field1&amp;gt;0 )) AS F1Count  count(eval("Field 2"&amp;gt;0)) AS F2Count&lt;/P&gt;

&lt;P&gt;The "Field 2" results in a syntax error saying "The eval expression for dynamic field '"Field 2"&amp;gt;0' is invalid"&lt;/P&gt;

&lt;P&gt;I can't rename the "Field 2". Is they any other way to query this data.&lt;/P&gt;

&lt;P&gt;I could do &lt;BR /&gt;
index=i source=s earliest=-7W@W latest=@W "Field 2"&amp;gt;0| timechart span=1w  count AS F2Count&lt;/P&gt;

&lt;P&gt;but this requires me to run this query multiple times for each field.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2014 22:41:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-query-multiple-conditions-when-the-field-name-has-a-space/m-p/149689#M41887</guid>
      <dc:creator>vjverma</dc:creator>
      <dc:date>2014-07-18T22:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to query multiple conditions when the field name has a space</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-multiple-conditions-when-the-field-name-has-a-space/m-p/149690#M41888</link>
      <description>&lt;P&gt;Of course you can rename &lt;CODE&gt;Field 2&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=i source=s earliest=-7W@W latest=@W | rename "Field 2" as Field_2 | timechart span=1w count AS Overall count(eval(field1&amp;gt;0 )) AS F1Count count(eval(Field_2&amp;gt;0)) AS F2Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively you can use single quotes in &lt;CODE&gt;eval&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=i source=s earliest=-7W@W latest=@W | timechart span=1w count AS Overall count(eval(field1&amp;gt;0 )) AS F1Count count(eval('Field 2'&amp;gt;0)) AS F2Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Double quotes would make that a string that can't be compared with a number, causing that error.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jul 2014 23:08:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-query-multiple-conditions-when-the-field-name-has-a-space/m-p/149690#M41888</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-18T23:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to query multiple conditions when the field name has a space</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-multiple-conditions-when-the-field-name-has-a-space/m-p/149691#M41889</link>
      <description>&lt;P&gt;Thank you. Worked like a charm.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Jul 2014 02:18:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-query-multiple-conditions-when-the-field-name-has-a-space/m-p/149691#M41889</guid>
      <dc:creator>vjverma</dc:creator>
      <dc:date>2014-07-19T02:18:15Z</dc:date>
    </item>
  </channel>
</rss>

