I have a view that I want to find the sum of, which is the total miles... So if the user filters on july-15 then I wanted a sum to display anywhere on the view of the total miles, in bellows example would be 10+101.. maybe 111 appears below that number.... is there a way?
On the List tab on the ribbon select Modify View. Scroll down and expand Totals section. Select Sum next to Total Miles column and save the view. You can use it together with groups and sorting.
I've created calculated column with result type
number and set view aggregation from code. It works fine with COUNT (which is also impossible to set from UI):
But for SUM it does not display propertly:
There were some tutorials on this in sharepoint 2010 times... like this one: https://social.msdn.microsoft.com/forums/sharepoint/en-US/e6c4bb8e-6162-419f-ba74-bb9f48f7fbdc/sum-in-xsltlistviewwebpart-with-sharepoint-designer-2010
Unfortunatelly it has become a lot harder in the days since sharepoint designer doesn't have preview functionality anymore.
I would probably advise you to try to achieve your goal with jQuery, but it definitly has its disadvantages.