Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Formatting PERCENTSUM Aggregation
mkdz
I am using the PERCENTSUM Aggregation to get a column with percentages of my data. The aggregation returns values like "0.483579302". How would I get it to display the percentages like "48.36%" with a precision of 2 decimal places? Thanks!
Find more posts tagged with
Comments
kclark
In the onCreate() of your aggregation you could do something like this<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
var val = this.getValue();
var nVal = (val * 100);
this.setDisplayValue( nVal.toFixed(2) + "%" );</pre>