<?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 change specific value of grouped values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/617450#M214576</link>
    <description>&lt;P&gt;You can make it in a single eval statement&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval "activity (to-be)"=if(count&amp;gt;1 AND (in(activity, "c","z" )), activity."_".count, activity)&lt;/LI-CODE&gt;&lt;P&gt;so, if count&amp;gt;1 and activity is either c or z it will behave the same way&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 22:44:06 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-10-17T22:44:06Z</dc:date>
    <item>
      <title>How to change specific value of grouped values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/616943#M214405</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a lot of event data, where every instance can be idendified by a unique ID. Every instance contains several activities. Some activities occur not only once. For some this is okay, but for others I would like to add e.g. a "_2" at the end of the activity name for the second occurence of this activity.&lt;/P&gt;&lt;P&gt;As this should be performed only for the second activity within the instance and only for some activities within all, I was not sure if it is possible to transform the data with SPL in the way I need it to be.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your support!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 09:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/616943#M214405</guid>
      <dc:creator>lukas1</dc:creator>
      <dc:date>2022-10-13T09:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to change specific value of grouped values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/616948#M214406</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/250304"&gt;@lukas1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to detail all the rules in an eval command,&lt;/P&gt;&lt;P&gt;If you could share some additional information, I could be more detailed.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 09:09:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/616948#M214406</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-13T09:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to change specific value of grouped values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/616953#M214407</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your quick reply!&lt;/P&gt;&lt;P&gt;Here you can find a exaplary data set to illustrate my problem.&lt;/P&gt;&lt;P&gt;Currently I only have the field activity. For every caseID there are several activities (for caseID 1, there is 2x a, b, 2x c, d). For activity a it is totally okay to be there twice. But for activity c i want to differ the first and the second occurence within every case.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukas1_0-1665652767887.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21995i8E507B1B85B0BACC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukas1_0-1665652767887.png" alt="lukas1_0-1665652767887.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this could clarify some things.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 09:24:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/616953#M214407</guid>
      <dc:creator>lukas1</dc:creator>
      <dc:date>2022-10-13T09:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to change specific value of grouped values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/616962#M214408</link>
      <description>&lt;P&gt;Possibly with that table, you could add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;your search to produce the base table
| streamstats count by caseID activity
| eval "activity (to-be)"=if(activity="c" AND count&amp;gt;1, activity."_".count, activity)
| fields - count&lt;/LI-CODE&gt;&lt;P&gt;what this basically does if create your activity to be column based on either activity, or if the count of activity 'c's is more than one, add suffix of _{count} where count is calculated with the streamstats.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 09:57:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/616962#M214408</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-13T09:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to change specific value of grouped values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/617352#M214557</link>
      <description>&lt;P class="lia-align-left"&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp; for your answer!&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;It's working for me!&lt;/P&gt;&lt;P class="lia-align-left"&gt;So when i would also like for activity z to behave like c, would it then be a good approach to proceed like:&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;| streamstats count by caseID activity&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;| eval "activity (to-be)"=if(activity="c" AND count&amp;gt;1, activity."_".count, activity)&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;| eval "activity (to-be)"=if(activity="z" AND count&amp;gt;1, activity."_".count, activity)&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;| fields - count&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Otherwise it would mess up the count for c - would it?&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Best,&lt;/P&gt;&lt;P class="lia-align-left"&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 13:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/617352#M214557</guid>
      <dc:creator>lukas1</dc:creator>
      <dc:date>2022-10-17T13:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to change specific value of grouped values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/617450#M214576</link>
      <description>&lt;P&gt;You can make it in a single eval statement&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval "activity (to-be)"=if(count&amp;gt;1 AND (in(activity, "c","z" )), activity."_".count, activity)&lt;/LI-CODE&gt;&lt;P&gt;so, if count&amp;gt;1 and activity is either c or z it will behave the same way&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 22:44:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/617450#M214576</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-17T22:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to change specific value of grouped values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/617513#M214597</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;! It's working!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 11:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-specific-value-of-grouped-values/m-p/617513#M214597</guid>
      <dc:creator>lukas1</dc:creator>
      <dc:date>2022-10-18T11:59:46Z</dc:date>
    </item>
  </channel>
</rss>

