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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...