Dashboards & Visualizations

How to set time modifiers for a saved search to return data for the past one year, but not include the last 7 days?

vrmandadi
Builder

I am doing a saved search which should have a time range for past one year (start date) and end date should ignore the last week from today. Can anyone help me in this?

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

If by "ignore the last week" you mean no events from the last 7 days then try this:

earliest=-1y@d latest=-7d@d
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

If by "ignore the last week" you mean no events from the last 7 days then try this:

earliest=-1y@d latest=-7d@d
---
If this reply helps you, Karma would be appreciated.

ShaneNewman
Motivator

So start date would be earliest=-1y@w latest=-7d@d if I understand you correctly.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Start date would be '-1y@d' (one year ago today) or '-1y@w' (one year ago this week).

End date would be '-7d@d'.

---
If this reply helps you, Karma would be appreciated.

ShaneNewman
Motivator

Thanks for the correction!

0 Karma

vrmandadi
Builder

thanks everyone

0 Karma

richgalloway
SplunkTrust
SplunkTrust

If your problem is solved, please accept the answer.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...