Wednesday, March 11, 2009

Why can't I use Totals on a calculated column?

So you may have run into this frustration before: for some crazy reason, when creating views with Totals, you cannot include totals for Calculated columns (even if they are set to output as 'Number'!).

Here is a example situation:
You have a list of projects, each project has Q1 through Q4 values that you want to add up to give you a yearly total:



Easy enough, you just create a calculated column:



Now your list looks like this:


Here is where the frustration comes in, you want to see an average yearly spend so you create a view with Totals, unfortunately the calculated field doesn't even show up as an option!



This seems to me like an oversight from the product team, but at least there is an alternative method! If you view your list in datasheet view:



you can enable Totals here:



And magically your calculated column total shows up! Of course we wanted an average here, so just click the dropdown on your calculated column total field, and change the value to Average:



And there you have it. Be aware that for some odd reason the total will only display in datasheet view (if you change it back the other column totals stay but the calculated one disappears), but now you know how to find it.

No comments: