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!

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