I'm facing a problem in splunk like if i choose current session(2020) from filter then i should get the data of previous Session(2019).
I wrote a splunk query like :
index="entab_due" Session=2019 ClassName="* *"
| eval n=(tonumber(Session)-1)
| where totalBalance > 0 and Session = n
but i didn't get any result.
Problem : Get the data of previous session after selecting Session from filter
Please help me to get the solution.
Session=2019
in the base query, the results will contain only those events that have2019
in the Session field. There will be no events with2018
, which is why the query fails. If you want to search for 2018 then put 2018 in the filter. - RichG