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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...