Get Free Trial

Average decimal rounding

dongbeom Kim asked on October 6, 2020

Is the average of value decimal control possible?
I want to truncate the decimal point.


1 answer

Illia Yatsyshyn Illia Yatsyshyn Flexmonster October 6, 2020

Thank you for reaching out to us.
We suggest using the decimalPlaces property of the Format Object to truncate the number of decimals.
The detailed guide on number formatting can be found in our documentation.
Also, we have prepared a dedicated JSFiddle. It demonstrates the way to limit the number of decimals of the “Quantity” measure:

"slice": {
  "measures": [
    "uniqueName": "Quantity",
    "aggregation": "average",
    "format": "-7jtsxha85u600"
"formats": [{
  "name": "-7jtsxha85u600",
  "decimalPlaces": 2

Please let us know if it works for you.
Our team is looking forward to your feedback.
Best regards,

Please login or Register to Submit Answer