Hi
I have a very simple view to test the 'SUM' aggregation type but I cannot get it to work. All I am trying to do is sum the values of two content types decimal fields.
I have one column with content title and one column with value.
Please note I have 'aggregate' on, I have no sort criteria and no relationships or contexts to make things easier, the title column is on aggregation type 'group results together' and the value aggregation type 'SUM' with Group Column 'Value'.
No matter what I do I cannot get the column to sum?
Please note COUNT works.
If anyone could advise it would be most helpful.
Thank you
Stephen
PS Please note I have used the module 'Views Calc' and even though this does the job it will not work where a view has a relationship and the reason I'm conducting such an easy test with Views Aggregate SUM is that I require it to work for a more complicated view with many relationships.
Attachment | Size |
---|---|
Screenshot 1.png | 39.7 KB |
Screenshot 2.png | 281.96 KB |
Screenshot 3.png | 138.76 KB |
Screenshot 4.png | 148.33 KB |
Comments
The reason this isn't working
The reason this isn't working is because each node title is unique so when you group on the title it creates a line for each node. In order to pull this off you'd need to have a value that's shared (like a taxonomy) that you can group on and then it will work properly.
But... If you want to just sum all of the values for a particular node/content type simply remove the title, add "Content Type" and group by that and sum the field with the number and you'll get a view that displays the total of all values shown by the view.
Hope that helps.