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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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