I wanted to sum a column that has positive and negative values, and it just added the absolute values. The field is a decimal field, and I configured it to use "Total (Currency)".
For example, if the values are 300, 200, -50, it would summarize as 550 instead of 450.
I changed line 208 in file views_summarize.module from
$total += (float) preg_replace('/[^0-9\.]/', '', $val);
to
$total += (float) preg_replace('/[^-0-9\.]/', '', $val);
adding the "-" to the expression and that seemed to fix it.
I'm not a PHP expert, just at the hacking level and don't totally grok RegEx, so this might not be kosher but it works for me.
Fixed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.