<?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: Formatting Money in Histogram in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Formatting-Money-in-Histogram/m-p/394930#M114713</link>
    <description>&lt;P&gt;@splunkqy try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="&amp;lt;index-name&amp;gt;"
| search &amp;lt;filter-condition&amp;gt;
| where cost &amp;gt; 0 
| eval Amount=case(
    cost&amp;gt;=0.0 AND cost&amp;lt;1.0 ,"$0.0-$1.0",
    cost&amp;gt;=1 AND cost&amp;lt;10,"$1-$10",
    cost&amp;gt;=10 AND cost&amp;lt;100,"$10-$100",
    cost&amp;gt;=100 AND cost&amp;lt;1000,"$100-$1000",
    cost&amp;gt;=1000 AND cost&amp;lt;10000,"$1000-$10,000",
    cost&amp;gt;=10000 AND cost&amp;lt;100000,"$10,000-$100,000",
    cost&amp;gt;=100000 AND cost&amp;lt;1000000,"$100,000-$10,00,000",
    cost&amp;gt;=1000000 AND cost&amp;lt;10000000,"$10,00,000-$100,00,000",
    cost&amp;gt;=10000000 AND cost&amp;lt;100000000,"$100,00,000-$10,00,00,000",
    cost&amp;gt;=100000000 AND cost&amp;lt;1000000000,"$10,00,00,000-$100,00,00,000"
    ) 
| bin cost span=1log10 
| stats count as "Number of Transactions" by cost Amount 
| fields - cost
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 30 May 2019 14:59:04 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-05-30T14:59:04Z</dc:date>
    <item>
      <title>Formatting Money in Histogram</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-Money-in-Histogram/m-p/394929#M114712</link>
      <description>&lt;P&gt;We log money for amounts between $0.01 and $1,000,000,000.00. We are trying to format the histogram labels to show commas and remove trailing zeroes though. This is giving us a problem. &lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7116iDC3083082017D87A/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Our query is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="&amp;lt;index-name&amp;gt;"
| search &amp;lt;filter-condition&amp;gt;
| where cost &amp;gt; 0
| bin cost span=1log10
| eval Amount="$".cost
| chart count as "Number of Transactions" by Amount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This causes a problem with the amount formatting on the x-axis though. &lt;/P&gt;

&lt;P&gt;We tried this query too:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="&amp;lt;index-name&amp;gt;"
| search &amp;lt;filter-condition&amp;gt;
| where cost &amp;gt; 0
| bin cost span=1log10
| eval Amount="$".tostring(cost, "commas")
| chart count as "Number of Transactions" by Amount
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but nothing shows up in the visualization.&lt;/P&gt;

&lt;P&gt;How can we remove the trailing zeroes in the decimal part and add commas to thousands parts?&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 13:34:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-Money-in-Histogram/m-p/394929#M114712</guid>
      <dc:creator>splunkqy</dc:creator>
      <dc:date>2019-05-30T13:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Money in Histogram</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-Money-in-Histogram/m-p/394930#M114713</link>
      <description>&lt;P&gt;@splunkqy try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="&amp;lt;index-name&amp;gt;"
| search &amp;lt;filter-condition&amp;gt;
| where cost &amp;gt; 0 
| eval Amount=case(
    cost&amp;gt;=0.0 AND cost&amp;lt;1.0 ,"$0.0-$1.0",
    cost&amp;gt;=1 AND cost&amp;lt;10,"$1-$10",
    cost&amp;gt;=10 AND cost&amp;lt;100,"$10-$100",
    cost&amp;gt;=100 AND cost&amp;lt;1000,"$100-$1000",
    cost&amp;gt;=1000 AND cost&amp;lt;10000,"$1000-$10,000",
    cost&amp;gt;=10000 AND cost&amp;lt;100000,"$10,000-$100,000",
    cost&amp;gt;=100000 AND cost&amp;lt;1000000,"$100,000-$10,00,000",
    cost&amp;gt;=1000000 AND cost&amp;lt;10000000,"$10,00,000-$100,00,000",
    cost&amp;gt;=10000000 AND cost&amp;lt;100000000,"$100,00,000-$10,00,00,000",
    cost&amp;gt;=100000000 AND cost&amp;lt;1000000000,"$10,00,00,000-$100,00,00,000"
    ) 
| bin cost span=1log10 
| stats count as "Number of Transactions" by cost Amount 
| fields - cost
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 May 2019 14:59:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-Money-in-Histogram/m-p/394930#M114713</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-05-30T14:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting Money in Histogram</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-Money-in-Histogram/m-p/394931#M114714</link>
      <description>&lt;P&gt;Thank you. This is perfect.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 22:01:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-Money-in-Histogram/m-p/394931#M114714</guid>
      <dc:creator>splunkqy</dc:creator>
      <dc:date>2019-05-30T22:01:52Z</dc:date>
    </item>
  </channel>
</rss>

