SOLVED

SP List Display Sum of Calculated Column

Iron Contributor

Using SP Online and lists, I have two columns

 

 - net price (number column)

 - total price (calculated column)

 

The calculated column contains formulae that multiples [net price]*1.2

 

I now need to see the sum of both of these columns. I can achieve this for net price, but I can't see the option for total price when I go to list settings > edit view >totals

 

I assume this is because the total price column is a calculated column?

 

How can I achieve this without any programming and using default SP online functionality. 

5 Replies
best response confirmed by jonboylib (Iron Contributor)
Solution

@jonboylib unfortunately you can't sum a calculated column. Somebody at Microsoft put that into the "too difficult" bin many years ago which was a rubbish decision.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

You can use Power Automate to perform the calculation and update a new field (number column) and use the new field for Total. You automation should run every time is updated or a new item is added.

@Bharath Arja - doesn't this method create an infinite loop?

Good point, I think it would (without trying) as the generation of the calculation would constitute an edit. I suppose to workaround this, you'd need to add another logic check, or create a variable, and run the actual sum part only when that criteria is met (i.e. when the edit is NOT the calculation itself) but that seems like over engineering to me.
I've actually stumbled across this problem myself and my thought process was to just copy the value from the calculation column and move it to another column, but that sounds super clunky because you'd now have two columns with calculated totals. Ironically, I found another blog post that pretty much addresses all of this and user Bojan Lazarevic pointed out this creates an infinite loop but one option is to change the trigger to only When new item is created. I guess my thinking of adding an extra logic check is not viable, or simply over engineering/over complicating: https://learn.microsoft.com/en-us/answers/questions/89029/total-of-a-calculated-column-on-sharepoint...
1 best response

Accepted Solutions
best response confirmed by jonboylib (Iron Contributor)
Solution

@jonboylib unfortunately you can't sum a calculated column. Somebody at Microsoft put that into the "too difficult" bin many years ago which was a rubbish decision.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

View solution in original post