Splunk Search

display sum value in pie chart

ashabc
Contributor

I have used in the past count value in the pie chart. Now I need to display sum value in the chart. How can I do this?

| stats sum(TotalCost) by ProductCode

My intention is to display the sum(TotalCost) of each productType in the pie chart.

0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Here's an example based on _internal data:

index=_internal bytes=* | stats sum(bytes) as sum by sourcetype | eval sourcetype = sourcetype . " (sum=" . sum . ")"

By changing the sourcetype field I'm basically changing the pie chart labels.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Here's an example based on _internal data:

index=_internal bytes=* | stats sum(bytes) as sum by sourcetype | eval sourcetype = sourcetype . " (sum=" . sum . ")"

By changing the sourcetype field I'm basically changing the pie chart labels.

ashabc
Contributor

Thank you. It worked.

0 Karma

woodcock
Esteemed Legend

Like this:

... | chart sum(TotalCost) by ProductCode
0 Karma

ashabc
Contributor

Thanks for a pormpt response, Woodcok. Not sure my question is clear. I want to display the actual value i.e. the sum of TotalCost for each product type in the pie chart. ... | chart sum(TotalCost) by ProductCode will only display the pie chart and not the actual values.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...