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
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...