<?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 create a new field from existing fields after a sum in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564533#M196658</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you kamlesh_vaghela,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When i tried this i am getting the count as 0 for both true and false .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Adding to that ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum(true) and sum(false) for each service is my need .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any other way to achieve&amp;nbsp;this ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Aug 2021 13:15:17 GMT</pubDate>
    <dc:creator>dtccsundar</dc:creator>
    <dc:date>2021-08-24T13:15:17Z</dc:date>
    <item>
      <title>How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564510#M196649</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I need a help in creating a field using/grouping sum of 2 existing fields .&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;field 1- count_of_true(These will have independent counts for each services)&lt;/P&gt;&lt;P&gt;fields 2 - count_of_false(These will have independent counts for each services)&lt;/P&gt;&lt;P&gt;I am looking for a fields status which has sum(count_of_true)&amp;nbsp; as true &amp;amp; sum(count_of_false) as false as below after a stats like( |stats count by status)&lt;/P&gt;&lt;P&gt;Status&amp;nbsp; &amp;nbsp;count&lt;/P&gt;&lt;P&gt;true&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 212&lt;/P&gt;&lt;P&gt;false&amp;nbsp; &amp;nbsp; &amp;nbsp;313&lt;/P&gt;&lt;P&gt;I tried using transpose ,but the stats gives unexpected value ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 12:04:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564510#M196649</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2021-08-24T12:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564511#M196650</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170299"&gt;@dtccsundar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you looking for this? Just update your stats command.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(eval(Status="true")) as true count(eval(Status="false")) as false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KV&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 12:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564511#M196650</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-08-24T12:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564513#M196651</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170299"&gt;@dtccsundar&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This might give you what you asked.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval count_of_true=212, count_of_false=313 
| eval count=mvzip(count_of_true, count_of_false), count=split(count, ","), Status=split("true,false", ","), zip=mvzip(Status, count) 
| mvexpand zip 
| eval zip=split(zip, ","), Status=mvindex(zip, 0), count=mvindex(zip, 1) 
| table Status, count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, a like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 12:26:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564513#M196651</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-08-24T12:26:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564532#M196657</link>
      <description>&lt;P&gt;Thank you manjunathmeti ,&lt;/P&gt;&lt;P&gt;It gives count of each service (true and false ) and the the sum of (true and false)&lt;/P&gt;&lt;P&gt;| eval count_of_true=212, count_of_false=313&lt;BR /&gt;This is dynamic value which i will get after sum(true) and sum(false) and not the static one .&lt;/P&gt;&lt;P&gt;is there any other way ?&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 13:13:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564532#M196657</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2021-08-24T13:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564533#M196658</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you kamlesh_vaghela,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When i tried this i am getting the count as 0 for both true and false .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Adding to that ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sum(true) and sum(false) for each service is my need .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any other way to achieve&amp;nbsp;this ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 13:15:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/564533#M196658</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2021-08-24T13:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/565439#M197011</link>
      <description>&lt;P&gt;Please help me to get solution for this .&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 08:58:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/565439#M197011</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2021-09-01T08:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/565441#M197012</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;'s answer should work. You just need to update field names if needed etc.&lt;/P&gt;&lt;P&gt;Here is one query which you can use as start point with your testing.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal earliest=-1h
| stats count(eval(component="Metrics")) as true count(eval(component="ProcessTracker")) as false&lt;/LI-CODE&gt;&lt;P&gt;This should give you some values if you have access to _internal index. If not then just replace index name and those evaluation conditions (component="Metrics") with your field and wanted value of that field.&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 09:12:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/565441#M197012</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-09-01T09:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/566063#M197244</link>
      <description>&lt;P&gt;Hi Ismo,&lt;/P&gt;&lt;P&gt;Thank you !!&lt;/P&gt;&lt;P&gt;| stats count(eval("Status"="True")) as True count(eval("Status"="False")) as "False"&lt;/P&gt;&lt;P&gt;I am getting ,&lt;/P&gt;&lt;P&gt;True False&amp;nbsp;&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;/P&gt;&lt;P&gt;Please help me out&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 05:40:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/566063#M197244</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2021-09-07T05:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/566067#M197247</link>
      <description>&lt;P&gt;To be honest I'm not sure what you're trying to achieve and from what kind of data.&lt;/P&gt;&lt;P&gt;Do you have various fields in your events that each can have a value of true and false? And do you want to do an aggregate stats over all fields over all events?&lt;/P&gt;&lt;P&gt;Or do you want to have a stats value for each event over all fields of that event?&lt;/P&gt;&lt;P&gt;Or something else?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 06:25:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/566067#M197247</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-09-07T06:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field from existing fields after a sum</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/566090#M197259</link>
      <description>&lt;P&gt;Hi PickleRick,&lt;/P&gt;&lt;P&gt;The below one is the one which triggered that.&lt;/P&gt;&lt;P&gt;I have to get % of 2 and 3 values in a same field .&lt;/P&gt;&lt;P&gt;Status count&amp;nbsp;&lt;/P&gt;&lt;P&gt;True&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;False&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;50&lt;/P&gt;&lt;P&gt;Error&amp;nbsp; &amp;nbsp; &amp;nbsp; 10&lt;/P&gt;&lt;P&gt;exc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/P&gt;&lt;P&gt;temp&amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;&lt;P&gt;Total&amp;nbsp; &amp;nbsp;271&lt;/P&gt;&lt;P&gt;I need to get true% by&amp;nbsp; true+error /Total * 100 and False% by False+exc+temp/Total*100.&lt;/P&gt;&lt;P&gt;Please help me with the solution .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 08:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-new-field-from-existing-fields-after-a-sum/m-p/566090#M197259</guid>
      <dc:creator>dtccsundar</dc:creator>
      <dc:date>2021-09-07T08:18:14Z</dc:date>
    </item>
  </channel>
</rss>

