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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...