I need to add a new column to my sharepoint dashboard(created using Jquery). The value is a number which is extremly large and causing my dashboard to become mis figured. I have values in the trillions e.g (565000000000.001) .
I need to dipaly this value in decimal e.g 5.65 trillion. Can someone please point me in the right direction 🙂
My table code below:
TableRowHtml +="<TR><TD style='text-align: Left'>Curr</TD><TD 'style='font-size: 10px'>" + Curr[0].toFixed(2) + "</TD><TD 'style='font-size: 10px'>" + Curr[1].toFixed(2)+ "</TD><TD 'style='font-size: 10px'><img alt='' src=' IMAGE" + Curr1 + "'></TD><TD 'style='font-size: 10px'><img alt='' src=' IMAGE" + Curr7 + "'></TD><TD 'style='font-size: 10px'><img alt='' src='IMAGE" + Curr30 + "'></TD><TD 'style='font-size: 10px'> <div id='div3' style='float: right; width: 75px; height: 30px; margin-bottom: -20px! important;'></div></TD></TR>";
Divide value by a trillion, then round down to 2 decimals.
And in case you can not round to a certain amount of decimals:
Divide value by a trillion/100 (ie 10.0000.000.000), then round, then divide by 100.
In code:
And alternative (gives you 5 instead of 5.00)