<input type="time" token="Datepkr">
<label>Time Range Picker</label>
<default>
<earliest>-15m</earliest>
<latest>now</latest>
</default>
<change>
<eval token="date_last_week.earliest">relative_time($Datepkr.earliest$, "-7d")</eval>
<eval token="date_last_week.latest">relative_time($Datepkr.latest$, "-7d")</eval>
</change>
</input>
Search for stuff from -7d | eval ReportKey=”Last_Week” | modify the “_time” field | append [subsearch for stuff today | eval ReportKey=”Today”] | timechart it based on ReportKey
I've posted a number of solutions for this problem, see a post from yesterday that references some of those
https://community.splunk.com/t5/Splunk-Search/Multiple-time-searches/m-p/669128#M229514
Effectively you have a global search that sees your Datepkr token and does a small search to calculate the relative dates - it needs addinfo, as that makes sure the tokens from the time picker are converted to epoch.
Then in your main search you can do
search (earliest=$Datepkr.earliest$ latest=$Datepkr.latest$) OR (earliest=$my_other_token_earliest$ latest=$my_other_token_latest$)
...
| eval category=if(_time <= $my_other_token_latest$, "PREV", "CURRENT")
| eval _time=if(_time <= $my_other_token_latest$, _time+my_offset, _time)
...
| timechart bla by category
which looks for both date ranges and then sets the category based on which range it's from, and then adjusts the PREV range _time to the current time, so they are overlaid. - my_offset is the amount of time between your two ranges.
This methodology works, so if you're struggling to get something working, post what you've got and we can help.