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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

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