<?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: Line Chart Overlay based on previous month and previous month-1 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525786#M148395</link>
    <description>&lt;P&gt;Answer 1: the printf puts a leading zero on date_mday so that the ordering is in numeric order otherwise you would end up with 1, 10, 11, 12, 13, ... 2, 20, 21 etc&lt;/P&gt;&lt;P&gt;Answer 2: no, you want the x-axis to be the same for both lines, which is why the printf above is done.&lt;/P&gt;&lt;P&gt;Answer 3: assuming you have an epoch date, you can format the way it is displayed either by eval or fieldformat date_1=strftime(date_1,"%d/%m/%Y")&lt;/P&gt;&lt;P&gt;Answer 4: date_month (like date_mday) is a field splunk has usually automatically added and in your case would contain one of two values, namely, august and september (which is what you asked for)&lt;/P&gt;&lt;P&gt;Answer 5: xyseries specifies which dimensions you want on the x-axis (day_mday), y-axis (count) and series (date_month) (it might have been better to call it xseriesy to make it easier to remember the order of the parameters!)&lt;/P&gt;</description>
    <pubDate>Wed, 21 Oct 2020 13:32:32 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2020-10-21T13:32:32Z</dc:date>
    <item>
      <title>Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525506#M148312</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to compare the data of the previous month to the month before (i.e. now its October, so the default search will show September and August line chart in one panel).&lt;/P&gt;&lt;P&gt;In the edit search portion of the dashboard, I've set the Time Range to 'Tokens' and Earliest Token to "@mon' and Latest Token to '@mon-1'&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ronaldtanhj_0-1603177950707.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11370i1EA79FDE1D8D2E61/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ronaldtanhj_0-1603177950707.png" alt="ronaldtanhj_0-1603177950707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ronaldtanhj_1-1603178014296.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11371i1C6FA5AE47DD1453/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ronaldtanhj_1-1603178014296.png" alt="ronaldtanhj_1-1603178014296.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know how I can include the chart for&amp;nbsp;&amp;nbsp;Earliest Token of "@mon-1' and Latest Token to '@mon-1' within the same search/panel?&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:15:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525506#M148312</guid>
      <dc:creator>ronaldtanhj</dc:creator>
      <dc:date>2020-10-20T07:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525509#M148313</link>
      <description>&lt;P&gt;you can use below earliest and latest to consider previous two months&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=test earliest=-2mon@mon latest=-0mon@mon&lt;/P&gt;&lt;P&gt;you can see below the earliest and latest will consider from starting of August to end of September.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thambisetty_0-1603179001062.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11372i89D4BE5555493832/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thambisetty_0-1603179001062.png" alt="thambisetty_0-1603179001062.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:30:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525509#M148313</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-10-20T07:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525515#M148318</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Noted that the earliest and latest command is at the start of the spl.&lt;/P&gt;&lt;P&gt;However, I am trying to compare 2 months of data using a linechart. How can I go about overlaying the charts by setting the earliest and latest point? (i.e. Put August line chart over Sept line chart) - and later on calculating the different and putting it in a separate chart.&lt;/P&gt;&lt;P&gt;Thanks and apologies as I am quite new to Splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:44:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525515#M148318</guid>
      <dc:creator>ronaldtanhj</dc:creator>
      <dc:date>2020-10-20T07:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525524#M148321</link>
      <description>&lt;P&gt;Depending on your aggregation function (I have used the sum of counts from events)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-- base query
| eval date_mday=printf("%02d",date_mday)
| stats sum(count) as count by date_mday date_month
| xyseries date_mday date_month count&lt;/LI-CODE&gt;&lt;P&gt;You should set your time period to earliest=-2mon@mon and latest=@mon as previously suggested by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129407"&gt;@thambisetty&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 08:11:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525524#M148321</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-20T08:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525774#M148390</link>
      <description>&lt;P&gt;Hi ITWhisperer,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;I'm trying to understand the your reply but couldn't get the query to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I understand that by starting off with&amp;nbsp;&lt;SPAN&gt;earliest=-2mon@mon and latest=-@mon, it bounds the timeframe to current month-1 and current month -2 (i.e now its October, so the data will be between start August and end September"&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, what I couldn't quite understand is the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;| eval date_mday=printf("%02d",date_mday)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Question 1&lt;/STRONG&gt;: May I know what the printf function does and how "%02d" divides the data into August and September?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Question 2&lt;/STRONG&gt;: Shouldn't there be 2 of such an 'eval'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i.e&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;eval date_1=printf(xxxx, date_1) to set the boundary between start and end August&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;eval date_2=printf(xxxx, date_2)&amp;nbsp; to set the boundary between start and end September.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Question 3&lt;/STRONG&gt;: Lets say I want to specify a date for date_1 and date_2, how can i change the line? - I've tried eval date_2=printf("1/1/2020, date_2) while setting the timepicker to all time and no defining the 'earliest' and 'latest' at the start - but faced an error message.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Question 4&lt;/STRONG&gt;: What does date_month represent in the case below? Does it not require an 'eval' like when date_mday was defined?&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;| stats sum(count) as count by date_mday date_month&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;for my case, I am performing a series of eval and stats sum by several fields in order to get the final value.&lt;/P&gt;&lt;P&gt;sample:&lt;/P&gt;&lt;P&gt;|stats latest(fieldX) as X, earliest(fieldY) as earliest Y by field1, field2&lt;BR /&gt;|eval A=X-Y&lt;BR /&gt;|stats sum(A) as B by field 2&lt;/P&gt;&lt;P&gt;I'm trying to plot this value B (a barchart that is based on field 2 which is unique) and compare the different between the previous month and the month before it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 5:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;| xyseries date_mday date_month count&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;With my requirement for this, should the plotting of chart be like:&lt;BR /&gt;|xyseries date_1 date_2 B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for the long list of question as I am new to Splunk.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 13:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525774#M148390</guid>
      <dc:creator>ronaldtanhj</dc:creator>
      <dc:date>2020-10-21T13:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525786#M148395</link>
      <description>&lt;P&gt;Answer 1: the printf puts a leading zero on date_mday so that the ordering is in numeric order otherwise you would end up with 1, 10, 11, 12, 13, ... 2, 20, 21 etc&lt;/P&gt;&lt;P&gt;Answer 2: no, you want the x-axis to be the same for both lines, which is why the printf above is done.&lt;/P&gt;&lt;P&gt;Answer 3: assuming you have an epoch date, you can format the way it is displayed either by eval or fieldformat date_1=strftime(date_1,"%d/%m/%Y")&lt;/P&gt;&lt;P&gt;Answer 4: date_month (like date_mday) is a field splunk has usually automatically added and in your case would contain one of two values, namely, august and september (which is what you asked for)&lt;/P&gt;&lt;P&gt;Answer 5: xyseries specifies which dimensions you want on the x-axis (day_mday), y-axis (count) and series (date_month) (it might have been better to call it xseriesy to make it easier to remember the order of the parameters!)&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 13:32:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/525786#M148395</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-21T13:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/526593#M148627</link>
      <description>&lt;P&gt;Hi ITWhisperer,&lt;/P&gt;&lt;P&gt;Thanks for the detailed explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I still couldn't get the output I want.&lt;/P&gt;&lt;P&gt;Is there another option to use the 'Chart Overlay' when creating a dashboard? Can i pass another value from another chart to this 'Overlay'?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ronaldtanhj_0-1603784177364.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11510i212A7FC1F602E0F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ronaldtanhj_0-1603784177364.png" alt="ronaldtanhj_0-1603784177364.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 07:36:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/526593#M148627</guid>
      <dc:creator>ronaldtanhj</dc:creator>
      <dc:date>2020-10-27T07:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/526594#M148628</link>
      <description>&lt;P&gt;Overlay works for one series but your requirement was for two and I don't think you can do that (although I might be wrong).&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 07:51:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/526594#M148628</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-27T07:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/526754#M148686</link>
      <description>&lt;P&gt;Hi IT whisperer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply, now I understand how 'xyseries' works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe what I intend to plot can be done using 'xyseries'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a sample of requirement on excel.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thumbnail_image.png" style="width: 1478px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11526i0CAE398B3A2CE3AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thumbnail_image.png" alt="thumbnail_image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;With that, I believe that using xyseries, the first input should be 'Item' to represent the item1-6 on the X axis.&lt;/P&gt;&lt;P&gt;Y Y should be Measurement(August or any month that's previously defined) and.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway to define the month?&lt;/P&gt;&lt;P&gt;I've tried briefly but it couldn't work:&lt;/P&gt;&lt;P&gt;E.g. eval prev1mon = strftime( _time, "%M)&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;eval prev2mon =.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;|stats sum(X1) as measurement1 by item, prev1mon&lt;/P&gt;&lt;P&gt;|stats sum (X2)&amp;nbsp; as measurement2 by item, prev2mon&lt;/P&gt;&lt;P&gt;|xyseries item measurement1 measurement2&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this the correct approach? And how should this be changed to reach my intended output?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 06:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/526754#M148686</guid>
      <dc:creator>ronaldtanhj</dc:creator>
      <dc:date>2020-10-28T06:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/526781#M148694</link>
      <description>&lt;P&gt;The time for each event is already broken down for you, as I used in my original response date_mon is the month. Having said that, you appear to be trying to get the month as a number (btw, %M gives minutes, %m gives months). So try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-- base query
| eval date_mday=printf("%02d",date_mday)
| eval month=strftime(_time,"%m")
| stats sum(count) as count by date_mday month
| xyseries date_mday month count&lt;/LI-CODE&gt;&lt;P&gt;The stats command will reduce the fields passed down the pipe to only those output by the stats command so&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|stats sum(X1) as measurement1 by item, prev1mon
|stats sum (X2)  as measurement2 by item, prev2mon&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;won't do what you are expecting as the second stats will have no X2, or prev2mon to work with so you will get no results.&lt;/P&gt;&lt;P&gt;In this instance, creating two different fields, prev1mon and prev2mon is not the right approach since you already have a field which identifies the month each event is from so you can use that in the by clause of the stats command (as I have shown).&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 08:48:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/526781#M148694</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-28T08:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/527205#M148820</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried based on your suggestion but it shows 'no results found'&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also modified it based on my requirement (there are 2 key conditions and the final graph's xaxis should be shown in a discrete form based on condition1) understand.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- base query&lt;/P&gt;&lt;P&gt;| eval date_mday=printf("%02d",date_mday)&amp;nbsp;&lt;/P&gt;&lt;P&gt;| eval month=strftime(_time,"%m")&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;|stats count as ABC by date_mday, month, condition1, condition2&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;|eval EFG=round (ABC/1000,3)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;|stats sum(EFG) as 'XYZ' by condition1, date_mday, month&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;|xyseries condition1, date_mday month&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| stats sum(count) as count by date_mday month&lt;/P&gt;&lt;P&gt;| xyseries date_mday month count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 1:&lt;/P&gt;&lt;P&gt;Do note that there are some calculations in values in front, will this impact the use of xyseries?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 2:&lt;/P&gt;&lt;P&gt;Based on your reply&amp;nbsp;&lt;/P&gt;&lt;P&gt;Answer 5: xyseries specifies which dimensions you want on the x-axis (day_mday), y-axis (count) and series (date_month) (it might have been better to call it xseriesy to make it easier to remember the order of the parameters!)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is for the X axis to be discrete unique assets and y axis to be a value for 2 different periods. Maybe I can provide u an analogy;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To compare the difference in expenses for different areas over August and september.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for this case, the X axis will be transport , leisure and food - represented in 3 separate points.&lt;/P&gt;&lt;P&gt;The y axis will be the value of $$ which was previously calculated based on several conditions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The graph will be shown in 2 lines, one red which represents August spendings and one yellow which represents Spetember spends.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 2:&amp;nbsp; is your suggestion for this output? There may be some miscommunication.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 05:03:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/527205#M148820</guid>
      <dc:creator>ronaldtanhj</dc:creator>
      <dc:date>2020-10-30T05:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/527220#M148824</link>
      <description>&lt;P&gt;If you are no longer plotting by day of the month but using discrete conditions you don't need to bother with date_mday (unless you are doing two separate plots).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;-- base query
| eval month=strftime(_time,"%m")
| stats count as ABC by month condition1 condition2
| eval EFG=round(ABC/1000,3)
| stats sum(EFG) as XYZ by condition1 month
| xyseries condition1 month XYZ&lt;/LI-CODE&gt;&lt;P&gt;You would normally use xyseries once to set up the table for the plot, it is fine to do calculations can be done before the xyseries (as above).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 07:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/527220#M148824</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-30T07:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/527243#M148840</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm now able to plot it. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To add on to that, I currently have it in my dashboard and I am trying to add a picker picker option to set the 2 separate months (might not be in sequence, e.g January Vs June).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the earliest and latest is defined by -2mon@mon and -0mon@mon, I'm unable modify it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried using the token in the dashboard but was not able to display the correct month and legend. Any advise on this issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 08:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/527243#M148840</guid>
      <dc:creator>ronaldtanhj</dc:creator>
      <dc:date>2020-10-30T08:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Line Chart Overlay based on previous month and previous month-1</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/527250#M148842</link>
      <description>&lt;P&gt;If your original question is solved, please mark the appropriate answer as the solution.&lt;/P&gt;&lt;P&gt;In answer to your further question, the way I would approach it is to use a time picker input to allow the user to select the required time span. I would use the tokens from this to provide earliest and latest to your main query. I would also use them in a multi-select dropdown to allow the user to pick months from the timeframe, which would also be used in your main query to filter the desired months. If you only want two months, you could do this with two (single select) dropdowns and if the user selects the same month for both, they would only get one line.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 08:55:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Line-Chart-Overlay-based-on-previous-month-and-previous-month-1/m-p/527250#M148842</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-30T08:55:34Z</dc:date>
    </item>
  </channel>
</rss>

