<?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: convert thousand to K in timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175713#M50456</link>
    <description>&lt;P&gt;You could always just eval the count down by some factor.&lt;/P&gt;

&lt;P&gt;search ... | stats count by state | eval k=count/1000 | timechart span=10m k by state&lt;/P&gt;

&lt;P&gt;You could also use a logarithmic y axis in your timechart. If you data is regularly having peaks like that. &lt;/P&gt;</description>
    <pubDate>Fri, 08 Aug 2014 05:12:31 GMT</pubDate>
    <dc:creator>Lucas_K</dc:creator>
    <dc:date>2014-08-08T05:12:31Z</dc:date>
    <item>
      <title>convert thousand to K in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175712#M50455</link>
      <description>&lt;P&gt;Hi!! &lt;BR /&gt;
Please, someone who perhaps has ever happened, I'm generating a report with timechart, but the Y value reaches thousands and millions. I wish for these cases, the value becomes 1K or 1M, without the graphic timechart deformed. &lt;BR /&gt;
My query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ... | timechart span=10m count by state
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Under a modified image with the desired outcome to be more clear &lt;BR /&gt;
&lt;IMG src="http://answers.splunk.com//storage/timechart_jrodriguezap2.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 04:24:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175712#M50455</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2014-08-08T04:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: convert thousand to K in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175713#M50456</link>
      <description>&lt;P&gt;You could always just eval the count down by some factor.&lt;/P&gt;

&lt;P&gt;search ... | stats count by state | eval k=count/1000 | timechart span=10m k by state&lt;/P&gt;

&lt;P&gt;You could also use a logarithmic y axis in your timechart. If you data is regularly having peaks like that. &lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 05:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175713#M50456</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2014-08-08T05:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: convert thousand to K in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175714#M50457</link>
      <description>&lt;P&gt;I think it would be very hard. I have an idea but it can support only "K" or "M".&lt;/P&gt;

&lt;P&gt;Could you try the following search query?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search) 
| bucket span=10m
| stats count by state _time
| eval k=count/1000
| timechart span=10m sum(k) AS count by state
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 07:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175714#M50457</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2014-08-08T07:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: convert thousand to K in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175715#M50458</link>
      <description>&lt;P&gt;Your screenshot suggests you want to squish the range from 75k to 1M into one 25k range, and leave 0k to 75k unsquished?&lt;/P&gt;

&lt;P&gt;That can be done with a bit of Splunk search foo, but the display isn't going to tell the user about it. Here's an idea:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | timechart count by state | foreach * [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = if('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' &amp;lt;= 75000, '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;', 75000 + (('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'-75000)*(25000/975000)))]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will scale the graph above 75k such that 1M will fall onto 100k... but the values shown in the chart are the squished values, not the original values.&lt;/P&gt;

&lt;P&gt;What you actually need is a more flexible charting library that allows you nonlinear scales beyond simple logarithmic scales. If such a thing exists in the Javascript framework world then you can build it into your Splunk.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 10:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175715#M50458</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-08T10:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: convert thousand to K in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175716#M50459</link>
      <description>&lt;P&gt;What he needs is Unit K or M, your eval will just convert the number but it wont add unit K at the end of the converted number.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 10:57:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175716#M50459</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-08-08T10:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: convert thousand to K in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175717#M50460</link>
      <description>&lt;P&gt;What he needs is Unit K or M, your eval will just convert the number but it wont add unit K at the end of the converted number.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 11:01:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175717#M50460</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-08-08T11:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: convert thousand to K in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175718#M50461</link>
      <description>&lt;P&gt;Oh, I see it is complicated. &lt;BR /&gt;
Since there is no function or style to convert these values​​, an alternative would be suspected Javascript. &lt;BR /&gt;
Hopefully sometime Splunk can have this option, it would be good to show what great graphics figures. &lt;BR /&gt;
Thank you all!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 14:57:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-thousand-to-K-in-timechart/m-p/175718#M50461</guid>
      <dc:creator>jrodriguezap</dc:creator>
      <dc:date>2014-08-08T14:57:31Z</dc:date>
    </item>
  </channel>
</rss>

