<?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 combine two evals in to a single case statement in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521327#M146900</link>
    <description>&lt;P&gt;I have 1600+ storage arrays and they are from multiple vendors, each with different thin provisioning levels. I currently have two columns one called TP at 1.2 and one called TP at 1.5. I'd like to combine them into a single column. I tried an if statement, but I couldn't get it right, I'm thinking I need to use a case statement but I'm not sure.&amp;nbsp; Here is an example&lt;/P&gt;&lt;P&gt;eval "Thin Prov"=Case(((SV='vendorA' AND SM='MODEL1' OR SM='Model2'),(TC*1.5), (SV='vendorb' AND SM='Model3' or SM='Model4',TC*1.2))&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 16:38:07 GMT</pubDate>
    <dc:creator>codedtech</dc:creator>
    <dc:date>2020-09-24T16:38:07Z</dc:date>
    <item>
      <title>combine two evals in to a single case statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521327#M146900</link>
      <description>&lt;P&gt;I have 1600+ storage arrays and they are from multiple vendors, each with different thin provisioning levels. I currently have two columns one called TP at 1.2 and one called TP at 1.5. I'd like to combine them into a single column. I tried an if statement, but I couldn't get it right, I'm thinking I need to use a case statement but I'm not sure.&amp;nbsp; Here is an example&lt;/P&gt;&lt;P&gt;eval "Thin Prov"=Case(((SV='vendorA' AND SM='MODEL1' OR SM='Model2'),(TC*1.5), (SV='vendorb' AND SM='Model3' or SM='Model4',TC*1.2))&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 16:38:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521327#M146900</guid>
      <dc:creator>codedtech</dc:creator>
      <dc:date>2020-09-24T16:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: combine two evals in to a single case statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521346#M146911</link>
      <description>&lt;P&gt;If column "TP at 1.2" and "TP at 1.5" are mutually exclusive i.e if "TP at 1.2" has a value then "TP at 1.5" is null and vice versa then try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval "Thin Prov"=if(isnull('TP at 1.2'),"TC*1.5","TC*1.2")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 18:36:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521346#M146911</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-24T18:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: combine two evals in to a single case statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521459#M146948</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;unfortunately they are not mutually exclusive.&amp;nbsp; I was thinking something like this should work but I can't seem to get it right.&lt;BR /&gt;&lt;BR /&gt;eval TP=case(((storage-model="A" OR storage-model="B"), (TCap*1.5)-LProv))&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 13:38:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521459#M146948</guid>
      <dc:creator>codedtech</dc:creator>
      <dc:date>2020-09-25T13:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: combine two evals in to a single case statement</title>
      <link>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521463#M146949</link>
      <description>&lt;P&gt;You have too many brackets&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;eval TP=case((storage-model="A" OR storage-model="B"), (TCap*1.5)-LProv, condition2, value2, etc, etc)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 25 Sep 2020 13:49:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/combine-two-evals-in-to-a-single-case-statement/m-p/521463#M146949</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-25T13:49:22Z</dc:date>
    </item>
  </channel>
</rss>

