<?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 iterating non uniform fields and value in splunk in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303738#M36166</link>
    <description>&lt;P&gt;Hi splunkers&lt;BR /&gt;
Good morning,&lt;/P&gt;

&lt;P&gt;I have came across a new problem &lt;/P&gt;

&lt;P&gt;ProgramName = StarMovies &lt;BR /&gt;
ProgramName = starmovies&lt;BR /&gt;
ProgramName = starMovies&lt;BR /&gt;
programName = Star Movies&lt;BR /&gt;
ProgramName = Starmovies&lt;/P&gt;

&lt;P&gt;Like this i have a data in my logs . what i want that all these field should combine and programname count should be 5 for starmovies &lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2018 11:17:03 GMT</pubDate>
    <dc:creator>kannu</dc:creator>
    <dc:date>2018-01-12T11:17:03Z</dc:date>
    <item>
      <title>iterating non uniform fields and value in splunk</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303738#M36166</link>
      <description>&lt;P&gt;Hi splunkers&lt;BR /&gt;
Good morning,&lt;/P&gt;

&lt;P&gt;I have came across a new problem &lt;/P&gt;

&lt;P&gt;ProgramName = StarMovies &lt;BR /&gt;
ProgramName = starmovies&lt;BR /&gt;
ProgramName = starMovies&lt;BR /&gt;
programName = Star Movies&lt;BR /&gt;
ProgramName = Starmovies&lt;/P&gt;

&lt;P&gt;Like this i have a data in my logs . what i want that all these field should combine and programname count should be 5 for starmovies &lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 11:17:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303738#M36166</guid>
      <dc:creator>kannu</dc:creator>
      <dc:date>2018-01-12T11:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: iterating non uniform fields and value in splunk</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303739#M36167</link>
      <description>&lt;P&gt;Hi kannu,&lt;BR /&gt;
at first it's an error or you could have different field names: ProgramName and programName (different case for P)?&lt;/P&gt;

&lt;P&gt;if you have different field names you can use coalesce funtion:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval ProgramName=coalesce(ProgramName, programName)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't know if it's acceptable for you, but you could transform each value in upper or lower case and delete spaces between words, in this way you have the same value and you can count values using stats command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your_search
| eval ProgramName=lower(trim(ProgramName))
| rex field=ProgramName mode=sed "s/\s//"
| stats count BY ProgramName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 13:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303739#M36167</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-01-12T13:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: iterating non uniform fields and value in splunk</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303740#M36168</link>
      <description>&lt;P&gt;Hi @cusello&lt;/P&gt;

&lt;P&gt;actually sorry for the mistake data was like this &lt;/P&gt;

&lt;P&gt;ProgramName = Star Movies HD &lt;BR /&gt;
ProgramName = Star MoviesHD&lt;BR /&gt;
ProgramName = StarMovies HD&lt;/P&gt;

&lt;P&gt;Want to make them all three look identical like Star Movies HD&lt;BR /&gt;
Only spaces are creating trouble &lt;BR /&gt;
can you help me in that&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 16:36:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303740#M36168</guid>
      <dc:creator>kannu</dc:creator>
      <dc:date>2018-03-02T16:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: iterating non uniform fields and value in splunk</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303741#M36169</link>
      <description>&lt;P&gt;No problem i have figured it out by myself &lt;/P&gt;</description>
      <pubDate>Sat, 03 Mar 2018 06:32:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/iterating-non-uniform-fields-and-value-in-splunk/m-p/303741#M36169</guid>
      <dc:creator>kannu</dc:creator>
      <dc:date>2018-03-03T06:32:25Z</dc:date>
    </item>
  </channel>
</rss>

