<?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 How to remove Commas In a Field Value? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616224#M106473</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I have recently just downloaded Splunk on my MAC for experimenting/practicing searching and dashboarding. I just picked a random csv file that has planetary information.&lt;/P&gt;
&lt;P&gt;One of the fields in my .csv file has a mix of numbers without commas, and three numbers that have a comma.&lt;/P&gt;
&lt;P&gt;EX: 59,800&lt;/P&gt;
&lt;P&gt;I think this is causing those values to not show up in my visualization.&lt;/P&gt;
&lt;P&gt;Is there a way to remove said comma from the field value? I tried using this below in the source code under the visualization but it says it's an unknown option name.&lt;/P&gt;
&lt;P&gt;&amp;lt;option name="useThousandSeparators"&amp;gt;false&amp;lt;/option&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2022 20:53:18 GMT</pubDate>
    <dc:creator>cdson</dc:creator>
    <dc:date>2022-10-06T20:53:18Z</dc:date>
    <item>
      <title>How to remove Commas In a Field Value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616224#M106473</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I have recently just downloaded Splunk on my MAC for experimenting/practicing searching and dashboarding. I just picked a random csv file that has planetary information.&lt;/P&gt;
&lt;P&gt;One of the fields in my .csv file has a mix of numbers without commas, and three numbers that have a comma.&lt;/P&gt;
&lt;P&gt;EX: 59,800&lt;/P&gt;
&lt;P&gt;I think this is causing those values to not show up in my visualization.&lt;/P&gt;
&lt;P&gt;Is there a way to remove said comma from the field value? I tried using this below in the source code under the visualization but it says it's an unknown option name.&lt;/P&gt;
&lt;P&gt;&amp;lt;option name="useThousandSeparators"&amp;gt;false&amp;lt;/option&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 20:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616224#M106473</guid>
      <dc:creator>cdson</dc:creator>
      <dc:date>2022-10-06T20:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Commas In a Field Value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616225#M106474</link>
      <description>&lt;P&gt;To add, since there's a .tostring and fieldformat option to format values is there a way in the raw search to remove commas?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 20:24:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616225#M106474</guid>
      <dc:creator>cdson</dc:creator>
      <dc:date>2022-10-06T20:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove Commas In a Field Value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616234#M106476</link>
      <description>&lt;P&gt;So, how are you getting your data from that CSV into Splunk - have you ingested the data or have you made a Splunk lookup and are using&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup your_csv.csv&lt;/LI-CODE&gt;&lt;P&gt;If you are dealing with a CSV lookup, then any commas in the field must be quoted, otherwise Splunk will think they are separate fields in the lookup, so it will break the parsing.&lt;/P&gt;&lt;P&gt;However, if you have got those fields and they just contain commas, then it's simple to replace commas. 3 possible ways, but these are the most common 2&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=your_field mode=sed "s/,//g"
| eval your_field=replace(your_field, ",", "")&lt;/LI-CODE&gt;&lt;P&gt;The rex command uses sed syntax to replace all commas with empty string. The eval statement does the same.&lt;/P&gt;&lt;P&gt;If the field has a comma, Splunk will not treat is as a number.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 22:00:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616234#M106476</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-06T22:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove Commas In a Field Value?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616357#M106492</link>
      <description>&lt;P&gt;Thank you! This worked!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 17:24:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-Commas-In-a-Field-Value/m-p/616357#M106492</guid>
      <dc:creator>cdson</dc:creator>
      <dc:date>2022-10-07T17:24:50Z</dc:date>
    </item>
  </channel>
</rss>

