need help in the correct format helper for rounding to specific number of decimal on a number, example i have the value 15153.636 i need it to be 15,153.64
Hi @Mohammed_Alquraini, and welcome to the Losant Forums.
From our documentation on the {{format}} helper:
{{format val formatStr}}:
Ifvalis a number, returns the number in the D3 format matching theformatStrparameter (default ‘,.6’). When used in a dashboard, this will use the current browser locale when formatting.
So, you should be able to get what you’re after with the following helper:
{{format value ',.2f'}}
You can use our in-app template tester to try this yourself and also to check other d3 format strings:
Let us know if you have any other questions, and again, welcome to Losant!
