I want to retrieve items from a SharePoint list using REST, and then sum one of the columns. I'm brand new to REST, and didn't see a way to do this on MSDN. Is it possible to sum a column in a REST query?

I'm using InfoPath to collect the data. Would I be better off submitting it to SQL Server and then building the report from there, instead of submitting the data to a SharePoint list and using REST?

  • You shold not run queries directly towards SharePoint databases, always only through supported API. – Jussi Palo Feb 13 '12 at 20:37

You cannot use aggregate functions with REST.

"This release does not support Aggregate functions (sum, min, max, avg, etc) as they would change the meaning of the ‘/’ operator to allow traversal through sets." Source

My only suggestion would be to get the items and do calculate the SUM on client side, if possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.