Dashboards & Visualizations

How to add percentages to Bar Charts?

POR160893
Builder

Hi,

I have a series of bar charts and when I hoover each bar, I currently see the count value.

What I actually need is the percentage value.

Here is my current query and bar chart:


POR160893_0-1660221712147.png

 

| inputlookup Migration-Status-All.csv
| search Vendor = "Symantec"
| eval dummy = 'Migration Comments'
| chart count over "Migration Comments" by dummy



How can I change my query to show a percentage when hoovering over each bar?


Many thanks,
Patrick

Labels (3)
0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Give this a try

**UPDATED

 

| inputlookup Migration-Status-All.csv
| search Vendor = "Symantec"
| stats count by "Migration Comments"
|  eventstats sum(count) as Total
|  eval perc=round(count*100/Total,2)
| eval dummy = 'Migration Comments'
| chart sum(perc) over "Migration Comments" by dummy

 

 

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

Give this a try

**UPDATED

 

| inputlookup Migration-Status-All.csv
| search Vendor = "Symantec"
| stats count by "Migration Comments"
|  eventstats sum(count) as Total
|  eval perc=round(count*100/Total,2)
| eval dummy = 'Migration Comments'
| chart sum(perc) over "Migration Comments" by dummy

 

 

POR160893
Builder

Thanks .... works perfectly (and I gave you Kudos!)

0 Karma

POR160893
Builder

I get no results for either:

POR160893_0-1660223721402.png

or (changing the per to perc):

POR160893_1-1660223757012.png

 



Tags (1)
0 Karma

somesoni2
SplunkTrust
SplunkTrust

Try the updated query above.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...