Im trying to create a field at admin/settings/views_calc. I need to do a calculation like a school grade like:

Homework 87.3 x 25% = 87.3 x .25 = 21.825
Quizzes 86.4 x 30% = 86.4 x .30 = 25.92
Tests 82 x 45% = 82 x .45 = 36.9
Total 21.825 + 25.92 + 36.9 = 84.645

but my fields are:

(%node_data_field_artistic_merit_video.field_artistic_merit_video_value*.15)+(%node_data_field_accuracy_complete_video.field_accuracy_complete_video_value*.25)+(%node_data_field_artistic_merit_robot_desig.field_artistic_merit_robot_desig_value*.25)+(%node_data_field_technical_of_robot_design.field_technical_of_robot_design_value*.25)+(%node_data_field_phase_1_other.field_phase_1_other_value*.10)

I was sure this would work but i get a The values ..... in Total are not allowed error. What am i doing wrong?

Comments

arithmetric’s picture

Priority: Critical » Normal

Did you catch the note that you must leave spaces between parentheses, operators, and field tokens?

I solved my problem with this error by adding spaces. Using your example, I would suggest trying:

( %node_data_field_artistic_merit_video.field_artistic_merit_video_value * .15 ) + ( %node_data_field_accuracy_complete_video.field_accuracy_complete_video_value * .25 ) + ( %node_data_field_artistic_merit_robot_desig.field_artistic_merit_robot_desig_value * .25 ) + ( %node_data_field_technical_of_robot_design.field_technical_of_robot_design_value * .25 ) + ( %node_data_field_phase_1_other.field_phase_1_other_value * .10 )

karens’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

The D6 version is no longer supported.