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!

Video | Welcome Back to Smartness, Pedro

Remember Splunk Community member, Pedro Borges? If you tuned into Episode 2 of our Smartness interview series, ...

Detector Best Practices: Static Thresholds

Introduction In observability monitoring, static thresholds are used to monitor fixed, known values within ...

Expert Tips from Splunk Education, Observability in Action, Plus More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...