<?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: Need to compare 2 float values , after converting a string type to a float in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535148#M151255</link>
    <description>&lt;P&gt;For example , In my case I need to compare 2 floating point numbers.&lt;/P&gt;&lt;P&gt;Suppose 3.9.2 version is greater than 3.6.13 version and if I try to repace "." with "" and then compare , it gives incorrect results.&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jan 2021 05:36:50 GMT</pubDate>
    <dc:creator>vn_g</dc:creator>
    <dc:date>2021-01-08T05:36:50Z</dc:date>
    <item>
      <title>Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535036#M151214</link>
      <description>&lt;P&gt;client_type = 'JDBC_DRIVER' , client_version = '3.9.2'&lt;BR /&gt;The above is the exact value in the lookup.&lt;/P&gt;&lt;P&gt;| rex field=clienttype_minimumversion_details max_match=0 "client_type\s=\s'(?&amp;lt;REPORTED_CLIENT_TYPE&amp;gt;.*?(?='\s,))"&lt;BR /&gt;| rex field=clienttype_minimumversion_details max_match=0 "client_version\s=\s'(?&amp;lt;MINIMUM_VERSION_REQUIRED&amp;gt;.*?(?='))"&lt;BR /&gt;Using the above I am extracting 2 fields&lt;/P&gt;&lt;P&gt;| eval version= tonumber(trim(MINIMUM_VERSION_REQUIRED))&lt;BR /&gt;| eval type=typeof(version)&lt;BR /&gt;The output of (MINIMUM_VERSION_REQUIRED) is Invalid&lt;/P&gt;&lt;P&gt;I need it in number format so that I can compare it to another numeric field in the logs.&lt;BR /&gt;I tried tonumber and convert , it doesnt work.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 11:51:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535036#M151214</guid>
      <dc:creator>vn_g</dc:creator>
      <dc:date>2021-01-07T11:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535044#M151218</link>
      <description>&lt;P&gt;The conversion of MINIMUM_VERSION_REQUIRED fails because 3.9.2 is not a number (at least according to the mathematics I know).&amp;nbsp; You might try stripping out the dots to get a numeric version.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 13:49:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535044#M151218</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-07T13:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535046#M151219</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/40398"&gt;@vn_g&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Replace the dots with nothing I tested it with this - the output of "typeofversion" was "number" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|  makeresults
|  eval MINIMUM_VERSION_REQUIRED="3.9.2"
|  eval MINIMUM_VERSION_REQUIRED=replace(MINIMUM_VERSION_REQUIRED,"\.","")
|  eval typeofversion=typeof(MINIMUM_VERSION_REQUIRED)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;BR&lt;BR /&gt;Ralph&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 13:52:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535046#M151219</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2021-01-07T13:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535148#M151255</link>
      <description>&lt;P&gt;For example , In my case I need to compare 2 floating point numbers.&lt;/P&gt;&lt;P&gt;Suppose 3.9.2 version is greater than 3.6.13 version and if I try to repace "." with "" and then compare , it gives incorrect results.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 05:36:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535148#M151255</guid>
      <dc:creator>vn_g</dc:creator>
      <dc:date>2021-01-08T05:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535159#M151259</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/40398"&gt;@vn_g&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;There might be a more dynamic solution that I can't think of right now, but this should work for you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval MINIMUM_VERSION_REQUIRED="3.9.209767"
| eval COMPARE_VERSION="3.6.105"
| eval MINIMUM_VERSION_REQUIRED=replace(MINIMUM_VERSION_REQUIRED,"\.","")
| eval COMPARE_VERSION=replace(COMPARE_VERSION,"\.","")

| eval zero_count=len(COMPARE_VERSION)-len(MINIMUM_VERSION_REQUIRED)
| eval MINIMUM_VERSION_REQUIRED=case(zero_count&amp;lt;=0,MINIMUM_VERSION_REQUIRED,zero_count=1,MINIMUM_VERSION_REQUIRED+"0",zero_count=2,MINIMUM_VERSION_REQUIRED+"00",zero_count=3,MINIMUM_VERSION_REQUIRED+"000")
| eval COMPARE_VERSION=case(zero_count&amp;gt;=0,COMPARE_VERSION,zero_count=-1,COMPARE_VERSION+"0",zero_count=-2,COMPARE_VERSION+"00",zero_count=-3,COMPARE_VERSION+"000")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the length (~count of numbers) is different between the two version fields, it will add trailing zeros to make it match. Now you can compare.&lt;BR /&gt;&lt;BR /&gt;This works with up to 3 more (or less) numbers in the two version fields (like compare 3.9.1. with 3.5.12.32)&lt;BR /&gt;If you expect even more sub/minor versions to compare, you would have to extend the two &lt;EM&gt;case&amp;nbsp;&lt;/EM&gt;statements with zero_count=4, VERSION_FIELD+"0000"&amp;nbsp; etc.&lt;BR /&gt;&lt;BR /&gt;BR&lt;BR /&gt;Ralph&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 08:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535159#M151259</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2021-01-08T08:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535166#M151264</link>
      <description>&lt;P&gt;| makeresults&lt;BR /&gt;| eval MINIMUM_VERSION_REQUIRED="3.9.2"&lt;BR /&gt;| eval COMPARE_VERSION="3.12.9"&lt;BR /&gt;| eval MINIMUM_VERSION_REQUIRED=replace(MINIMUM_VERSION_REQUIRED,"\.","")&lt;BR /&gt;| eval COMPARE_VERSION=replace(COMPARE_VERSION,"\.","")&lt;BR /&gt;| eval zero_count=len(COMPARE_VERSION)-len(MINIMUM_VERSION_REQUIRED)&lt;BR /&gt;| eval MINIMUM_VERSION_REQUIRED=case(zero_count&amp;lt;=0,MINIMUM_VERSION_REQUIRED,zero_count=1,MINIMUM_VERSION_REQUIRED+"0",zero_count=2,MINIMUM_VERSION_REQUIRED+"00",zero_count=3,MINIMUM_VERSION_REQUIRED+"000",zero_count=4,MINIMUM_VERSION_REQUIRED+"0000")&lt;BR /&gt;| eval COMPARE_VERSION=case(zero_count&amp;gt;=0,COMPARE_VERSION,zero_count=-1,COMPARE_VERSION+"0",zero_count=-2,COMPARE_VERSION+"00",zero_count=-3,COMPARE_VERSION+"000",zero_count=-4,COMPARE_VERSION+"0000")&lt;BR /&gt;| where COMPARE_VERSION &amp;lt; MINIMUM_VERSION_REQUIRED&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above case it still gives incorrect results . The COMPARE_VERSION&amp;nbsp; field value is not less than MINIMUM_VERSION_REQUIRED.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 09:41:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535166#M151264</guid>
      <dc:creator>vn_g</dc:creator>
      <dc:date>2021-01-08T09:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535171#M151265</link>
      <description>&lt;P&gt;Ah, shoot. That's right. You challenge me &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I guess we have to define something like major version, minor version a, minor version to make it work...&lt;BR /&gt;&lt;BR /&gt;Is there a max number of dots that you expect?&lt;BR /&gt;&lt;BR /&gt;I mean, you seem to have 3.12.9 (major version + minor version a + minor version b) ...can there also be 3&lt;STRONG&gt;.&lt;/STRONG&gt;12&lt;STRONG&gt;.&lt;/STRONG&gt;9&lt;STRONG&gt;.&lt;/STRONG&gt;4? (minor version c)?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 09:50:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535171#M151265</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2021-01-08T09:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535173#M151267</link>
      <description>&lt;P&gt;Yes , there can also be 3.12.9.4. Max number of dots can be 6.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 10:47:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535173#M151267</guid>
      <dc:creator>vn_g</dc:creator>
      <dc:date>2021-01-08T10:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535179#M151269</link>
      <description>&lt;P&gt;Solved it one simple eval statement &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;The SPL I have looks a bit too much for the use case. But it works now (I know, I said this earlier...so please double check &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval MINIMUM_VERSION="3.9.2"
| eval COMPARE_VERSION="3.5.2.1"

| eval  
MINIMUM_VERSION_major=mvindex(split(MINIMUM_VERSION,"."),0), 
MINIMUM_VERSION_minora=mvindex(split(MINIMUM_VERSION,"."),1), 
MINIMUM_VERSION_minorb=mvindex(split(MINIMUM_VERSION,"."),2),
MINIMUM_VERSION_minorc=mvindex(split(MINIMUM_VERSION,"."),3),
MINIMUM_VERSION_minord=mvindex(split(MINIMUM_VERSION,"."),4), 
MINIMUM_VERSION_minore=mvindex(split(MINIMUM_VERSION,"."),5),
MINIMUM_VERSION_minorf=mvindex(split(MINIMUM_VERSION,"."),6),

COMPARE_VERSION_major=mvindex(split(COMPARE_VERSION,"."),0),
COMPARE_VERSION_minora=mvindex(split(COMPARE_VERSION,"."),1),
COMPARE_VERSION_minorb=mvindex(split(COMPARE_VERSION,"."),2),
COMPARE_VERSION_minorc=mvindex(split(COMPARE_VERSION,"."),3),
COMPARE_VERSION_minord=mvindex(split(COMPARE_VERSION,"."),4),
COMPARE_VERSION_minore=mvindex(split(COMPARE_VERSION,"."),5),
COMPARE_VERSION_minorf=mvindex(split(COMPARE_VERSION,"."),6),

COMPARE_VERSION_minora = if(isnull(COMPARE_VERSION_minora),"0",COMPARE_VERSION_minora),
COMPARE_VERSION_minorb = if(isnull(COMPARE_VERSION_minorb),"0",COMPARE_VERSION_minorb),
COMPARE_VERSION_minorc = if(isnull(COMPARE_VERSION_minorc),"0",COMPARE_VERSION_minorc),
COMPARE_VERSION_minord = if(isnull(COMPARE_VERSION_minord),"0",COMPARE_VERSION_minord),
COMPARE_VERSION_minore = if(isnull(COMPARE_VERSION_minore),"0",COMPARE_VERSION_minore),
COMPARE_VERSION_minorf = if(isnull(COMPARE_VERSION_minorf),"0",COMPARE_VERSION_minorf),

MINIMUM_VERSION_minora = if(isnull(MINIMUM_VERSION_minora),"0",MINIMUM_VERSION_minora),
MINIMUM_VERSION_minorb = if(isnull(MINIMUM_VERSION_minorb),"0",MINIMUM_VERSION_minorb),
MINIMUM_VERSION_minorc = if(isnull(MINIMUM_VERSION_minorc),"0",MINIMUM_VERSION_minorc),
MINIMUM_VERSION_minord = if(isnull(MINIMUM_VERSION_minord),"0",MINIMUM_VERSION_minord),
MINIMUM_VERSION_minore = if(isnull(MINIMUM_VERSION_minore),"0",MINIMUM_VERSION_minore),
MINIMUM_VERSION_minorf = if(isnull(MINIMUM_VERSION_minorf),"0",MINIMUM_VERSION_minorf),

major_smaller = if(COMPARE_VERSION_major &amp;lt; MINIMUM_VERSION_major,"true","false"),
minora_smaller = if(COMPARE_VERSION_minora &amp;lt; MINIMUM_VERSION_minora,"true","false"),
minorb_smaller = if(COMPARE_VERSION_minorb &amp;lt; MINIMUM_VERSION_minorb,"true","false"),
minorc_smaller = if(COMPARE_VERSION_minorc &amp;lt; MINIMUM_VERSION_minorc,"true","false"),
minord_smaller = if(COMPARE_VERSION_minord &amp;lt; MINIMUM_VERSION_minord,"true","false"),
minore_smaller = if(COMPARE_VERSION_minore &amp;lt; MINIMUM_VERSION_minore,"true","false"),
minorf_smaller = if(COMPARE_VERSION_minorf &amp;lt; MINIMUM_VERSION_minorf,"true","false"),

smaller_global = 
if(major_smaller="true", "true",
if(minora_smaller="true", "true",
if(minorb_smaller="true", "true",
if(minorc_smaller="true", "true",
if(minord_smaller="true", "true",
if(minore_smaller="true", "true",
if(minorf_smaller="true", "true","false"
)))))))

 | fields MINIMUM_VERSION, COMPARE_VERSION, smaller_global&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The 2 blocks with mvindex are assigning the major and minor versions to fields.&lt;BR /&gt;Next 2 blocks fills "0" for the minor versions that don't exist.&lt;BR /&gt;Then we compoare the major and minor versions one by one and in the last eval for the smaller_global field is the main logic...if major is smaller = true, else if minora is smaller=true, else....&lt;BR /&gt;&lt;BR /&gt;I guess the SPL can be shortened with some FOREACH magic, or when you skip assigning the major and minor versions to fields and work with the mvindex statement directly . But it would be less readable I think...&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 11:37:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535179#M151269</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2021-01-08T11:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535187#M151270</link>
      <description>&lt;P&gt;If your problem is resolved, then please click the "Accept as Solution" button to help future readers.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 13:40:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535187#M151270</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-08T13:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535305#M151286</link>
      <description>&lt;P&gt;Hi Ralph,&lt;/P&gt;&lt;P&gt;Thankyou so much for your time.&lt;BR /&gt;&lt;BR /&gt;| eval MINIMUM_VERSION="3.9.2"&lt;BR /&gt;| eval COMPARE_VERSION="3.11.0"&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above is showing incorrect results.&lt;/P&gt;&lt;PRE&gt;smaller_global = 
if(major_smaller="true", "true",
if(minora_smaller="true", "true",
if(minorb_smaller="true", "true",
if(minorc_smaller="true", "true",
if(minord_smaller="true", "true",
if(minore_smaller="true", "true",
if(minorf_smaller="true", "true","false"
)))))))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Guess the above conditions needs to be re-valuated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nagasri.G&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 07:54:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535305#M151286</guid>
      <dc:creator>vn_g</dc:creator>
      <dc:date>2021-01-11T07:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535323#M151294</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/40398"&gt;@vn_g&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I guess I need more testing on my side &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Version 0.4 of my SPL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval MINIMUM_VERSION="3.9.2"
| eval COMPARE_VERSION="3.11.0"

| eval  
MINIMUM_VERSION_major=mvindex(split(MINIMUM_VERSION,"."),0), 
MINIMUM_VERSION_minora=mvindex(split(MINIMUM_VERSION,"."),1), 
MINIMUM_VERSION_minorb=mvindex(split(MINIMUM_VERSION,"."),2),
MINIMUM_VERSION_minorc=mvindex(split(MINIMUM_VERSION,"."),3),
MINIMUM_VERSION_minord=mvindex(split(MINIMUM_VERSION,"."),4), 
MINIMUM_VERSION_minore=mvindex(split(MINIMUM_VERSION,"."),5),
MINIMUM_VERSION_minorf=mvindex(split(MINIMUM_VERSION,"."),6),

COMPARE_VERSION_major=mvindex(split(COMPARE_VERSION,"."),0),
COMPARE_VERSION_minora=mvindex(split(COMPARE_VERSION,"."),1),
COMPARE_VERSION_minorb=mvindex(split(COMPARE_VERSION,"."),2),
COMPARE_VERSION_minorc=mvindex(split(COMPARE_VERSION,"."),3),
COMPARE_VERSION_minord=mvindex(split(COMPARE_VERSION,"."),4),
COMPARE_VERSION_minore=mvindex(split(COMPARE_VERSION,"."),5),
COMPARE_VERSION_minorf=mvindex(split(COMPARE_VERSION,"."),6),

COMPARE_VERSION_minora = if(isnull(COMPARE_VERSION_minora),"0",COMPARE_VERSION_minora),
COMPARE_VERSION_minorb = if(isnull(COMPARE_VERSION_minorb),"0",COMPARE_VERSION_minorb),
COMPARE_VERSION_minorc = if(isnull(COMPARE_VERSION_minorc),"0",COMPARE_VERSION_minorc),
COMPARE_VERSION_minord = if(isnull(COMPARE_VERSION_minord),"0",COMPARE_VERSION_minord),
COMPARE_VERSION_minore = if(isnull(COMPARE_VERSION_minore),"0",COMPARE_VERSION_minore),
COMPARE_VERSION_minorf = if(isnull(COMPARE_VERSION_minorf),"0",COMPARE_VERSION_minorf),

MINIMUM_VERSION_minora = if(isnull(MINIMUM_VERSION_minora),"0",MINIMUM_VERSION_minora),
MINIMUM_VERSION_minorb = if(isnull(MINIMUM_VERSION_minorb),"0",MINIMUM_VERSION_minorb),
MINIMUM_VERSION_minorc = if(isnull(MINIMUM_VERSION_minorc),"0",MINIMUM_VERSION_minorc),
MINIMUM_VERSION_minord = if(isnull(MINIMUM_VERSION_minord),"0",MINIMUM_VERSION_minord),
MINIMUM_VERSION_minore = if(isnull(MINIMUM_VERSION_minore),"0",MINIMUM_VERSION_minore),
MINIMUM_VERSION_minorf = if(isnull(MINIMUM_VERSION_minorf),"0",MINIMUM_VERSION_minorf),

major_bigger = if(COMPARE_VERSION_major &amp;gt; MINIMUM_VERSION_major,"true","false"),
minora_bigger = if(COMPARE_VERSION_minora &amp;gt; MINIMUM_VERSION_minora,"true","false"),
minorb_bigger = if(COMPARE_VERSION_minorb &amp;gt; MINIMUM_VERSION_minorb,"true","false"),
minorc_bigger = if(COMPARE_VERSION_minorc &amp;gt; MINIMUM_VERSION_minorc,"true","false"),
minord_bigger = if(COMPARE_VERSION_minord &amp;gt; MINIMUM_VERSION_minord,"true","false"),
minore_bigger = if(COMPARE_VERSION_minore &amp;gt; MINIMUM_VERSION_minore,"true","false"),
minorf_bigger = if(COMPARE_VERSION_minorf &amp;gt; MINIMUM_VERSION_minorf,"true","false"),

major_smaller = if(COMPARE_VERSION_major &amp;lt; MINIMUM_VERSION_major,"true","false"),
minora_smaller = if(COMPARE_VERSION_minora &amp;lt; MINIMUM_VERSION_minora,"true","false"),
minorb_smaller = if(COMPARE_VERSION_minorb &amp;lt; MINIMUM_VERSION_minorb,"true","false"),
minorc_smaller = if(COMPARE_VERSION_minorc &amp;lt; MINIMUM_VERSION_minorc,"true","false"),
minord_smaller = if(COMPARE_VERSION_minord &amp;lt; MINIMUM_VERSION_minord,"true","false"),
minore_smaller = if(COMPARE_VERSION_minore &amp;lt; MINIMUM_VERSION_minore,"true","false"),
minorf_smaller = if(COMPARE_VERSION_minorf &amp;lt; MINIMUM_VERSION_minorf,"true","false"),

smaller_global = 
if(major_smaller="true", "true",if(major_bigger="true", "false",
if(minora_smaller="true", "true",if(minora_bigger="true", "false",
if(minorb_smaller="true", "true",if(minorb_bigger="true", "false",
if(minorc_smaller="true", "true",if(minorc_bigger="true", "false",
if(minord_smaller="true", "true",if(minord_bigger="true", "false",
if(minore_smaller="true", "true",if(minore_bigger="true", "false",
if(minorf_smaller="true", "true",if(minorf_bigger="true", "false","versions_are_equal"
))))))))))))))
| fields MINIMUM_VERSION, COMPARE_VERSION, smaller_global&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now checking both for each major/minorversion:&amp;nbsp; If it's bigger or smaller. If either or is true, it breaks out. If not then the minor is equal and it goes to the next one...&lt;BR /&gt;&lt;BR /&gt;It prints "versions_are_ equal" if everything is equal. You could change that to "false", since equal is still "not smaller"...&lt;BR /&gt;&lt;BR /&gt;Please run some tests again.&lt;BR /&gt;&lt;BR /&gt;BR&lt;BR /&gt;Ralph&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2021 09:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535323#M151294</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2021-01-11T09:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Need to compare 2 float values , after converting a string type to a float</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535423#M151319</link>
      <description>&lt;P&gt;This query is working as expected. Thankyou so much.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2021 05:50:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-compare-2-float-values-after-converting-a-string-type-to/m-p/535423#M151319</guid>
      <dc:creator>vn_g</dc:creator>
      <dc:date>2021-01-12T05:50:28Z</dc:date>
    </item>
  </channel>
</rss>

