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!

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...