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!

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...