All Apps and Add-ons

Roundoff decimal option in splunk dashboard using XML query

nnimbe
Path Finder

We have created some of the dashboards like top allowed source, top allowed destinations using XML ,

option name="charting.chart.showPercent , will provide the percentage in that dashboard

but currently it is showing 3 decimal places like 2.123% or 43.456%, i want to round off or to display two decimal places like 2.12% or 43.46%,

how this could be achieved by tweaking the XML query, please suggest

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi nnimbe,
you can round your numbers in two ways:

  • in a table using number formatting functionality in Modify panels;
  • in search using | eval number=round(number,2)

Bye.
Giuseppe

View solution in original post

0 Karma

woodcock
Esteemed Legend

It cannot.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi nnimbe,
you can round your numbers in two ways:

  • in a table using number formatting functionality in Modify panels;
  • in search using | eval number=round(number,2)

Bye.
Giuseppe

0 Karma

nnimbe
Path Finder

@cusello , thanks,

in a table using number formatting functionality in Modify panels;---- We are using pie chart and i am not seeing this option, can u pls suggest to modify the XML queries if we are using the pie chart

in search using | eval number=round(number,2)--- this is fine when we are using search

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi nnimbe,
for Pie Charts there isn't a functionality like tables.
Bye.
Giuseppe

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