Splunk Search

Based on the current query need to show data -2weeks and +2weeks

rijinc
Explorer

Hi All,

Need you inputs based on the below query i need to display output such as it should be -2w and +2weeks :

| loadjob savedsearch=admin:appname:name1 | table FieldID FieldID1 field2 field3 | join type=left FieldID [| inputlookup Test_Go_Live_Details.csv | table FieldID Opp_Name GoLiveDate Apps_Live | eval Go_Live_Date=strptime(GoLiveDate,"%m/%d/%Y") | eval week_ending=relative_time(Go_Live_Date,"@w5") | eval week_ending=strftime(week_ending, "%Y-%m-%d") | chart sum(Apps_Live) over FieldID by week_ending usenull=f useother=f] | fillnull value="-"

Currently the output i am getting is like below which is all the data rgt from april till october, i just need as of today -2 weeks and +2weeks .
Opp_Name 4/27/2018 5/11/2018 5/25/2018 6/1/2018 6/15/2018 6/22/2018 6/29/2018 7/13/2018 7/27/2018
App1 - - - - - - - - 70 -
App2 - - - - - - - - - -
App3 - - 24 - 30 29 24 37 - 8

let me know if its possible in the above query
any help would be very much helpful to go further..

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 ...