MOSS 2007 Column Totals (Average) Decimal Places
Hello,I am averaging a column in a list. The decimal places go out9 places making my columns very wide. Is there any way I can limit the decimal places? I am displaying the list on a webpart.Thanks,Patrick
May 5th, 2009 4:06pm
You can use the round function in calculated column ROUND(number,num_digits) Number Is the number you want to round. Num_digits Specifies the number of digits to which you want to round the number. =ROUND(3.15, 1) Rounds 3.15 to one decimal place (3.2) =ROUND(3.149, 1) Rounds 3.149 to one decimal place (3.1) =ROUND(-3.475, 2) Rounds -3.475 to two decimal places (-3.48) =ROUND(21.5, -1) Rounds 21.5 to one decimal place to the left of the decimal point (20)
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2009 4:16pm
Pro, Thanks for the help. Unfortunately, I am using the "Totals" menu in the List Options to display my totals. So they're not actually averages stored in a column I've defined. They are the averages displayed by using the totals option in the view setting. Thanks, Patrick
May 5th, 2009 8:31pm
Hi Patrick, If that is the case the possible approach would be to edit the list view page, add a content editor webpart add javascript to do it. Will look out or will do an example to explain it further. Check this http://www.endusersharepoint.com/?p=1106 not exactly same but may help. thanks
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2009 8:56pm
I realize this thread is quite old but thought I'd throw this out there anyway: The decimal places go out 9 places because the column that is being averaged is set to "Automatic" for decimal places. Go to List Settings and modify that column,
setting the number of decimal places to whatever you want to round to. Setting the column to use 2 decimal places also forces the average to round to 2 decimal places.
February 4th, 2011 9:46pm