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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

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 ...