Splunk Enterprise

Creating a pie chart or any visualization show last 6 months and 12 month?

Keerthi
Path Finder

Hi All,

Keerthi_0-1684921742281.png

This is the existing visualization which has Lastlogon(people who haven't logged in for quiet sometime). Those record which has null lastlogon value is done a count. I have requirement here to show value for last 6 month and 12 months. Can anyone help me in providing the command for last 6 months and 12 months

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval period=case(_time > relative_time(_time,"-6mon@d"),"6months",_time > relative_time(_time,"-1y@d"),"12months") 

View solution in original post

Keerthi
Path Finder

How to show both last 6 and last 12 months together in a single visualization?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Just set a field with a value which represents which time segment it comes from and use that in your visualisation.

0 Karma

Keerthi
Path Finder

 you explain with an example for the command please

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval period=case(_time > relative_time(_time,"-6mon@d"),"6months",_time > relative_time(_time,"-1y@d"),"12months") 

ITWhisperer
SplunkTrust
SplunkTrust

Just extend your timeframe for your search to 6 months, then 12 months - assuming you have the data going back that far!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...