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 :slightly_smiling_face:
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 :slightly_smiling_face:
0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...