Splunk Search

How to visualise single series stats sum by filed and it total

dyapasrikanth
Path Finder

I am getting statistics like below (only 3 categories)

 

Category    Amount
cat1     20
cat2     30
cat3     40

 

and added total column also with query

 

| basequery
| chart sum(amount) as Amount by category 
| addtotals row=f col=t labelfield=category

 

which chart I can use to show this data & how to show Total in different color or different location in chart.

I tried bar chart but got same color for all bars, pie chart showing totals also in the same chart (misleading)

 

Labels (2)
0 Karma

renjith_nair
Legend

Try below search to get total as a different field.

| basequery
| chart sum(amount) as Amount by category 
|eventstats sum(Amount) as Total

 

Now you should be able to visualize with column or area with distinction in colors

renjith_nair_0-1618538291224.png

 

renjith_nair_1-1618538311019.png

 

Or even as an overlay

renjith_nair_2-1618538343659.png

 

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

dyapasrikanth
Path Finder

Thanks for your reply @renjith_nair , I tried it, but getting following area chart

dyapasrikanth_0-1618539178317.png

dyapasrikanth_1-1618539274545.png

dyapasrikanth_2-1618539294979.png

No total coming & not easy to understand

0 Karma

renjith_nair
Legend

Somehow the field "Total" is missing. Did you add the eventstats to  the search ?

Can you share your search ?

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...