<?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 Dynamically changing the x-axis values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-changing-the-x-axis-values/m-p/303246#M91237</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;
I have this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="attenuation"
|dedup CONCATENATE_Z
|eval TRATTA=NODO_A."-&amp;gt;".NODO_Z 
|lookup eol.csv TRATTA OUTPUT eol as EOL
|search TRATTA="ROMA-&amp;gt;MILANO"
|eval DATA=strftime(strptime('END_OF_INTERVAL',"%Y-%m-%d"),"%Y-%m-%d")
|table DATA SPAN_LOSS EOL
| sort DATA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For every "TRATTA" I have many "SPAN_LOSS" values (one per day).&lt;BR /&gt;
Plotting the chart I can't visualize the values of x-axis maybe because are too many.&lt;/P&gt;

&lt;P&gt;How Can I visualize the values of DATA for example grouped by week or month?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2017 13:42:35 GMT</pubDate>
    <dc:creator>ngerosa</dc:creator>
    <dc:date>2017-08-28T13:42:35Z</dc:date>
    <item>
      <title>Dynamically changing the x-axis values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-changing-the-x-axis-values/m-p/303246#M91237</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;
I have this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="attenuation"
|dedup CONCATENATE_Z
|eval TRATTA=NODO_A."-&amp;gt;".NODO_Z 
|lookup eol.csv TRATTA OUTPUT eol as EOL
|search TRATTA="ROMA-&amp;gt;MILANO"
|eval DATA=strftime(strptime('END_OF_INTERVAL',"%Y-%m-%d"),"%Y-%m-%d")
|table DATA SPAN_LOSS EOL
| sort DATA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For every "TRATTA" I have many "SPAN_LOSS" values (one per day).&lt;BR /&gt;
Plotting the chart I can't visualize the values of x-axis maybe because are too many.&lt;/P&gt;

&lt;P&gt;How Can I visualize the values of DATA for example grouped by week or month?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 13:42:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-changing-the-x-axis-values/m-p/303246#M91237</guid>
      <dc:creator>ngerosa</dc:creator>
      <dc:date>2017-08-28T13:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing the x-axis values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-changing-the-x-axis-values/m-p/303247#M91238</link>
      <description>&lt;P&gt;From the information that you have provided, we cannot tell what form SPAN_LOSS might take.  Below, I'm assuming that it is some kind of number, and that for any particular unit of time you want the sum of that number for the period. &lt;/P&gt;

&lt;P&gt;I'm assuming the part of your search limiting your results to the segment from Rome to Milan ("ROMA-&amp;gt;MILANO") is not part of your overall requirements, or you'd be doing it in the original search at the top.  I've moved it up, but you can pull it out completely after you do some testing.  &lt;/P&gt;

&lt;P&gt;Try this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index="attenuation" NODO_A="Roma" NODO_Z="Milano"
 | fields CONCATENATE_Z NODO_A NODO_Z END_OF_INTERVAL SPAN_LOSS
 | dedup CONCATENATE_Z
 | eval TRATTA=NODO_A."-&amp;gt;".NODO_Z 
 | lookup eol.csv TRATTA OUTPUT eol as EOL
 | eval _time=strptime('END_OF_INTERVAL',"%Y-%m-%d")
 | table _time SPAN_LOSS EOL
 | timechart sum(SPAN_LOSS) by EOL 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;... and then you can try chunking it up to the week &lt;CODE&gt;span=1w&lt;/CODE&gt; or month &lt;CODE&gt;span=1mon&lt;/CODE&gt; levels.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | timechart span=1w sum(SPAN_LOSS) by EOL 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Aug 2017 14:51:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-changing-the-x-axis-values/m-p/303247#M91238</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-28T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing the x-axis values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-changing-the-x-axis-values/m-p/303248#M91239</link>
      <description>&lt;P&gt;Hi DalJeanis,&lt;BR /&gt;
I didn't use timechart because I don't want to do any statistical operation, I want to display, for every "TRATTA", all values of "SPAN_LOSS" and "EOL".&lt;BR /&gt;
The chart has to display the trend of "SPAN_LOSS" compared to "EOL" over time&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:31:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-changing-the-x-axis-values/m-p/303248#M91239</guid>
      <dc:creator>ngerosa</dc:creator>
      <dc:date>2020-09-29T15:31:08Z</dc:date>
    </item>
  </channel>
</rss>

