<?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 group some of field value into new fields value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-some-of-field-value-into-new-fields-value/m-p/620831#M215804</link>
    <description>&lt;P&gt;This depends a lot on when you want this transformation. &amp;nbsp;If you want to see transformation before stats, it will depends on data characteristics. &amp;nbsp;Now, assuming you only want the transformation after &lt;FONT face="andale mono,times"&gt;| stats count by category&lt;/FONT&gt;, you can do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval newCategory = case(category IN ("Anonymizers", "Anonymizing Utilities", "Anonymizing Utilities, Internet Services"), "Anonymizers", category LIKE "Gambling%", "Gambling", category LIKE "Malicious Sites%", "Malicious Sites", true(), "Undef")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 05:36:48 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-11-15T05:36:48Z</dc:date>
    <item>
      <title>How to group some of field value into new fields value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-some-of-field-value-into-new-fields-value/m-p/620720#M215776</link>
      <description>&lt;P&gt;Hi peeps,&lt;/P&gt;
&lt;P&gt;Need help to do some query. Basically I'm trying to group some of field value in the &lt;STRONG&gt;'Category&lt;/STRONG&gt;' field into new fields call &lt;STRONG&gt;'newCategory'.&amp;nbsp;&lt;/STRONG&gt;Below are the sample of data:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="syazwani_0-1668417552002.png" style="width: 578px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22458i1DBD97BA603DC687/image-dimensions/578x238?v=v2" width="578" height="238" role="button" title="syazwani_0-1668417552002.png" alt="syazwani_0-1668417552002.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;newCategory&lt;/STRONG&gt; field will have the new count for each of the new field value (such as Anonymizers, Gambling, Malicious Site).&lt;/P&gt;
&lt;P&gt;Please help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 13:37:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-some-of-field-value-into-new-fields-value/m-p/620720#M215776</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2022-11-14T13:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to group some of field value into new fields value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-some-of-field-value-into-new-fields-value/m-p/620831#M215804</link>
      <description>&lt;P&gt;This depends a lot on when you want this transformation. &amp;nbsp;If you want to see transformation before stats, it will depends on data characteristics. &amp;nbsp;Now, assuming you only want the transformation after &lt;FONT face="andale mono,times"&gt;| stats count by category&lt;/FONT&gt;, you can do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval newCategory = case(category IN ("Anonymizers", "Anonymizing Utilities", "Anonymizing Utilities, Internet Services"), "Anonymizers", category LIKE "Gambling%", "Gambling", category LIKE "Malicious Sites%", "Malicious Sites", true(), "Undef")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 05:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-some-of-field-value-into-new-fields-value/m-p/620831#M215804</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-15T05:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to group some of field value into new fields value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-group-some-of-field-value-into-new-fields-value/m-p/620847#M215810</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;, thanks for reply. This solution worked. I try to do&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 07:51:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-group-some-of-field-value-into-new-fields-value/m-p/620847#M215810</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2022-11-15T07:51:13Z</dc:date>
    </item>
  </channel>
</rss>

