Dashboards & Visualizations

Pie chart - rounding percent values

IgorB
Path Finder

In Splunk 4.3.x pie charts using showPercent=true - is it possible to round up percent values shown on the chart?

Tags (1)

AndyMarr
Explorer

Using SPlunk 6 - it also defaults to 3 decimal places - how to change how many decimals?

0 Karma

lguinn2
Legend

I think this will work:

yoursearchhere
| top abc showperc=true
| eval percent=round(percent,0)
0 Karma

leonjxtan
Path Finder

I downvoted this post because i tried, it does not work.

0 Karma

Parameshwara
Path Finder

Does not work:

index=abc Year=1999 | stats sum(Field1) as NewField by Group | eval NewField=round(NewField,1)

Pie chart still shows as 3 decimal value, as per it's default formatting.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It works, but you have to be sure to use the results of the round() function in your chart.

---
If this reply helps you, Karma would be appreciated.
0 Karma

IgorB
Path Finder

That won't work - pie chart seems to be doing percent calculations on it's own

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