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
Revered Legend

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
Revered Legend

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
Revered Legend

Try the updated query above.

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