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!

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