I'm wandering if the total for the calculation field is supported by this module? I have a two cck fields field1 and field2. I successfully added calculation field field_sum and the total row for the field1 and field2 as on the table below. However I cannot get total of the calculation field (x in the table). I do enable a Display calculation in the views style for the field_sum and select a SUM operation though, but it results in a sql error near node.cid1, where cid1 is obviously a views_calc_fields table field:
SELECT
MAX('') AS node_title,
MAX('SUM') AS TOTAL_SUM,
SUM(node_data_field_1.field_1_value) AS node_data_field_1_field_1_value,
SUM(node_data_field_2.field_2_value) AS node_data_field_2_field_2_value,
SUM(node.cid1) AS unknown
FROM node node
LEFT JOIN content_type_project node_data_field_1
ON node.vid = node_data_field_1.vid
LEFT JOIN content_type_project node_data_field_2
ON node.vid = node_data_field_2.vid
WHERE (node.type in ('project'))
AND (node.nid IN (1202,1203))
LIMIT 0, 10
title field1 field2 | field_sum
a 2 1 | 3
b 3 2 | 5
c 4 3 | 7
--------------------+----------
total 9 6 | x
Comments
Comment #1
RobertNelsonVance commentedSubscribe
Comment #2
karens commentedI just committed some fixes so this would work, you can now create both sub totals and grand totals on calculated fields.
Comment #4
senzaesclusiva commentedHi miglius
I hope this does not bother you if i reopen your old message, but I'm trying to get your same result. So I would to ask you:
1) For the field_sum you used View_custom_field or View_php?
2) The query you posted is the one that adds the field_sum of field1 and field2?
3) Field_sum works even if the fields field1 and field2 are "hidden" in the view?
4) The solution committed worked for you?
Please, help me ... I'm going crazy
Thanks