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!

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

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...