<?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: Unable to filter based on 2 fields in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Unable-to-filter-based-on-2-fields-Help-with-syntax/m-p/621834#M11732</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you canoot insert an if conditon in a search, it's possible to use if only in eval command, but you could use something like this, to adapt to your situation:&lt;/P&gt;&lt;P&gt;if you want to exclude events with&amp;nbsp;&lt;SPAN&gt;Asset_State!="Development" OR Asset_State!="Pre-Production", bit for ONLY&amp;nbsp;Asset_Environment!="PKI&amp;nbsp; AND Offline" Status="2":&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| search NOT ((Asset_State!="Development" OR Asset_State!="Pre-Production") Asset_Environment!="PKI Offline_Status=2)&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;BR /&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 10:14:15 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-11-23T10:14:15Z</dc:date>
    <item>
      <title>Unable to filter based on 2 fields- Help with syntax</title>
      <link>https://community.splunk.com/t5/Reporting/Unable-to-filter-based-on-2-fields-Help-with-syntax/m-p/621833#M11731</link>
      <description>&lt;P&gt;Hey, I have a big query and I need to have a command on the query that would filter all&amp;nbsp;&amp;nbsp;Asset_State!="Development" OR Asset_State!="Pre-Production", bit for ONLY&amp;nbsp;Asset_Environment!="PKI&amp;nbsp; AND Offline" Status="2".&lt;/P&gt;
&lt;P&gt;If tried the following command:&lt;BR /&gt;| if(&amp;nbsp;Asset_Environment!="PKI&amp;nbsp; AND Offline" Status="2".,search NOT (Asset_State!="Development" OR Asset_State!="Pre-Production"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know the syntax is wrong, can you help ?&lt;BR /&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 14:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Unable-to-filter-based-on-2-fields-Help-with-syntax/m-p/621833#M11731</guid>
      <dc:creator>POR160893</dc:creator>
      <dc:date>2022-11-23T14:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to filter based on 2 fields</title>
      <link>https://community.splunk.com/t5/Reporting/Unable-to-filter-based-on-2-fields-Help-with-syntax/m-p/621834#M11732</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/240743"&gt;@POR160893&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you canoot insert an if conditon in a search, it's possible to use if only in eval command, but you could use something like this, to adapt to your situation:&lt;/P&gt;&lt;P&gt;if you want to exclude events with&amp;nbsp;&lt;SPAN&gt;Asset_State!="Development" OR Asset_State!="Pre-Production", bit for ONLY&amp;nbsp;Asset_Environment!="PKI&amp;nbsp; AND Offline" Status="2":&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| search NOT ((Asset_State!="Development" OR Asset_State!="Pre-Production") Asset_Environment!="PKI Offline_Status=2)&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;BR /&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 10:14:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Unable-to-filter-based-on-2-fields-Help-with-syntax/m-p/621834#M11732</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-23T10:14:15Z</dc:date>
    </item>
  </channel>
</rss>

