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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...