Dashboards & Visualizations

Overlaying two time charts with different ranges

jenniferbarlow_
New Member

Hi, 

I am trying to overlay two timecharts with different date ranges 

The code for the first time chart is for the date range March 1993- June 30th 2019 : 

index="midas_temp”     MET_DOMAIN_NAME=DLY3208 MET_DOMAIN_NAME=DLY3208   | eval trange=MAX_AIR_TEMP - MIN_AIR_TEMP | fields trange |bucket span=1d _time | stats avg(trange) AS avgdailytrange by _time |eval Month-Day=strftime(_time,"%m-%d")|chart avg(avgdailytrange) AS "average trange" by Month-Day

 

And the second time chart is for the date range March - June 2020: 

index="midas_temp" MET_DOMAIN_NAME=DLY3208 |eval trange=MAX_AIR_TEMP - MIN_AIR_TEMP|timechart avg(trange) span=1day

 

Is there a way I can put these two lines on the same timechart? 

Thanks 

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| gentimes start=03/01/1993 end=06/30/2019
| rename starttime as _time
| eval airtemp=random()%20+10
| eval MonthDay=strftime(_time,"%m-%d")
| chart avg(airtemp) as average by MonthDay
| append
    [| gentimes start=03/01/2020 end=06/30/2020
    | rename starttime as _time 
    | eval airtemp=random()%20+15
    | eval MonthDay=strftime(_time,"%m-%d")
    | table MonthDay airtemp]
| stats values(*) as * by MonthDay
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...