Splunk Search

How do I constrain a timechart's x-axis range, but still predict on more values than are displayed?

j_williams
Explorer

Hello,

Using Splunk Enterprise 6.2

I am running a prediction using 30+ historical days of data to predict the next 24 hours of a week day of a particular transaction's volume.

When creating the timechart, I do not want to show all 30+ days of data, but I still want to leverage that data in the prediction for the next 24-hour period. I need to limit the displayed time range to something like earliest=-48 and latest=+24h, constantly rolling around the time period of "now".

I am not having any luck with XML edits, such as "charting.axisX.minimumTime"/"charting.axisX.maximumTime".

Thanks,

-J

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

After your timechart and predict, you can add | where _time >= relative_time(now(), "-48h") to filter the results.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

After your timechart and predict, you can add | where _time >= relative_time(now(), "-48h") to filter the results.

j_williams
Explorer

Perfect, thank you for the prompt response!
I am double checking to make sure there are no discrepancies with/without the |where comment above, but prelim is showing exactly what I needed.

0 Karma

j_williams
Explorer

yup, matched fine. Thanks again.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

.conf25 Global Broadcast: Don’t Miss a Moment

Hello Splunkers, .conf25 is only a click away.  Not able to make it to .conf25 in person? No worries, you can ...

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...