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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...