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!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...