Splunk Dev

how to align values on X-axis

krishna1
Explorer

Iam trying to align values on X-axis in this order : ">3 days" ">5 days" ">15 days" ">30 days" ">100 days"
I have tried table command but its not giving me the expected output.

query:
|inputlookup acn_ticket_unresolved_dessertholdings_kv
| eval age=((now() - epoc_time_submitted)/86400),total_age=round(age,2)
|rangemap field=total_age ">3 days"=0-3.00 ">5 days"=3.01-15.00 ">15 days"=15.01-30.00 ">30 days"=30.01-100.00 ">100 days"=100.01-1000.00
| chart count as count1 over range by priority | rename priority as Priority


krishna1_0-1707368896056.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The chart command will sort string lexicographically, so change your range map to deliver numbers (3, 5, 15, 30, 100), then convert to strings after the chart command

|inputlookup acn_ticket_unresolved_dessertholdings_kv
| eval age=((now() - epoc_time_submitted)/86400),total_age=round(age,2)
|rangemap field=total_age "3"=0-3.00 "5"=3.01-15.00 "15"=15.01-30.00 "30"=30.01-100.00 "100"=100.01-1000.00
| chart count as count1 over range by priority
| eval range=">".range." days" | rename priority as Priority
0 Karma
Get Updates on the Splunk Community!

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

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...