Dashboards & Visualizations

Visualize fields as percentage in pie chart

harryvdtol
Path Finder

Hello,

I have 3 rows with numeric data, trying to visualize this in a pie chart.

The first value (totalval) is the total value
I want to the other values to be a percentage of the total value and so only show the 2 other values (typeA and typeB)

type           total
---------------------
totalval    4151
typeA       1442
typeB        17

Trying for some hours, i am stuck, any help is appreciated

Regards,

Harry

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| eval totalval=if(type="totalval",total,null())
| eventstats values(totalval) as totalval
| where type!="totalval"
| eval percent=100*total/totalval

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| eval totalval=if(type="totalval",total,null())
| eventstats values(totalval) as totalval
| where type!="totalval"
| eval percent=100*total/totalval
0 Karma

harryvdtol
Path Finder

Very impressive and educational.

Thank you.

Regards,

Harry

0 Karma
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...