<?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: Compare on field values with another field values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561142#M159490</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;SPL query is working but i want for multiple fields&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jul 2021 04:48:56 GMT</pubDate>
    <dc:creator>renuka</dc:creator>
    <dc:date>2021-07-28T04:48:56Z</dc:date>
    <item>
      <title>Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/560991#M159443</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I want compare one field values with another when I tried to compare it is coming in this format as shown in below pic&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="renuka_0-1627379406539.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15271iBA20CD07CAB30C6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="renuka_0-1627379406539.png" alt="renuka_0-1627379406539.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In above picture&amp;nbsp; Project.static_code metric* are the field names(left handside).On righthandside are the field values.But I want the format to be in the below pic form.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="renuka_1-1627379568256.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15272iB87558326B048BFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="renuka_1-1627379568256.png" alt="renuka_1-1627379568256.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 09:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/560991#M159443</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2021-07-27T09:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/560992#M159444</link>
      <description>&lt;P&gt;Can you share some raw events and which fields have already been extracted?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 10:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/560992#M159444</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-27T10:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/560994#M159445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224369"&gt;@renuka&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this? I have used short field names project_names,&amp;nbsp; customer_pplatform replace accordingly.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search_goes_here&amp;gt;
| eval project_static=replace(project_static, "{@comment}", "") 
| stats values(customer_platform) as mv by project_static
| eval result=mvindex(mv,1)." ".mvindex(mv,0) 
| table result&lt;/LI-CODE&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and Accept solution if this reply helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 10:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/560994#M159445</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-27T10:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/560997#M159446</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="renuka_0-1627381074632.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15274i0102FA11BBCC3DBE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="renuka_0-1627381074632.png" alt="renuka_0-1627381074632.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;this is actually xml files imported.on left side there are fields which we are considering now&lt;BR /&gt;eg:if field 1:Project metrics(@comment) :18 and field2:project metrics:no.of metrics count&lt;BR /&gt;i want to print the output&lt;BR /&gt;No.of metrics count&amp;nbsp; &amp;nbsp; 18&lt;BR /&gt;actually i want to compare one field value with another field value and display output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 10:21:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/560997#M159446</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2021-07-27T10:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561000#M159449</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thank you for reply&amp;nbsp;&lt;BR /&gt;It actually for working but i want for multiple fields&lt;BR /&gt;field 1:metrics count1&amp;nbsp; &amp;nbsp;Field7:18&lt;BR /&gt;field2:metrics count2&amp;nbsp; &amp;nbsp; &amp;nbsp;Field8:0&lt;BR /&gt;field 3:metrics count 3&amp;nbsp; &amp;nbsp; &amp;nbsp;Field9:20&lt;BR /&gt;field 4:metrics count 4&amp;nbsp; &amp;nbsp; &amp;nbsp;Field10:10&lt;BR /&gt;field 5:metrics count 5&amp;nbsp; &amp;nbsp; &amp;nbsp;Field11:0&lt;BR /&gt;field 6:metrics count 6&amp;nbsp; &amp;nbsp; &amp;nbsp;Field12:01&lt;BR /&gt;&amp;nbsp;Output should me in the form of&lt;BR /&gt;metrics count1&amp;nbsp; &amp;nbsp; &amp;nbsp;18&lt;BR /&gt;metrics count2&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;metrics count 3&amp;nbsp; &amp;nbsp; &amp;nbsp;20&lt;BR /&gt;metrics count 4&amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;BR /&gt;metrics count 5&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;metrics count 6&amp;nbsp; &amp;nbsp; &amp;nbsp;01&lt;BR /&gt;I tried foreach loop also but yet not showing any results&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 10:40:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561000#M159449</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2021-07-27T10:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561006#M159451</link>
      <description>&lt;P&gt;Can you share this in a code block &amp;lt;/&amp;gt; rather than a picture - it makes it easier to see what is going on, especially as the picture doesn't seem to include any of the elements you are interested in?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 10:54:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561006#M159451</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-27T10:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561133#M159488</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224369"&gt;@renuka&lt;/a&gt;&amp;nbsp;Did not get you what you were after?&lt;/P&gt;&lt;P&gt;Was the original solution not showing what you need? Can you share real field names and value's inside.&lt;/P&gt;&lt;P&gt;What's the output of SPL that i have provided?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 02:13:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561133#M159488</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-28T02:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561142#M159490</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;SPL query is working but i want for multiple fields&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 04:48:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561142#M159490</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2021-07-28T04:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561143#M159491</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224369"&gt;@renuka&lt;/a&gt;&amp;nbsp;Just define multiple fields means?, not quite clear what you were trying to achieve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 04:59:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561143#M159491</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-28T04:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561145#M159492</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="renuka_0-1627448511757.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15291iEB31C18B793D2927/image-size/large?v=v2&amp;amp;px=999" role="button" title="renuka_0-1627448511757.png" alt="renuka_0-1627448511757.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is how i am getting the output,&lt;BR /&gt;&amp;nbsp;i want output as,&lt;BR /&gt;&lt;SPAN&gt;Number of Function with Cyclomatic Complexity greater than 20&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18&lt;BR /&gt;Number of Function with Goto Complexity not equal to 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 05:03:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561145#M159492</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2021-07-28T05:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare on field values with another field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561146#M159493</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224369"&gt;@renuka&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should give output you need, just try exactly replace field_names.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search_goes_here&amp;gt;
| eval project_static=replace(project_static, "{@comment}", "") 
| stats values(customer_platform) as mv by project_static
| eval metric=mvindex(mv,1) , count=mvindex(mv,0) 
| table metric, count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 05:13:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-on-field-values-with-another-field-values/m-p/561146#M159493</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-28T05:13:55Z</dc:date>
    </item>
  </channel>
</rss>

