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
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...