Displaying average of all votes (sum up the multi-axis)
| Project: | Voting API |
| Version: | 6.x-2.3 |
| Component: | Views Integration |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
With the help at http://drupal.org/node/457886, I have managed to come as far as setting up the review system, consists of 2 node types (supplier, review) and 3 axis: Quality, Value, Reliability.
I was able to configure Views to display the average of votes on a view page. See screenshot: http://dropbox.akandatang.info/multi-axis.png
But now I'm faced with the new challenge: to display the average of overall votes (by summing up all 3 axis, then average.)
For example, given a voting scores like below:
First axis: Quality - 60%
Second axis: Value - 50%
Third axis: Reliability - 90%
Therefore the average of the above = (60+50+90)/3 = 66.67%
I was able to show the average on node page by using this code:
$overall_score = (($quality_rating[0]['value'])+($value_rating[0]['value'])+($reliability_rating[0]['value']))/3;
print theme('fivestar_static', $overall_score, '5');But what I need now is to add a column to the views page and display the average. What should I do to achieve that?

#1
I had eventually found the solution to this. For the benefit of others who might be looking for this, the solution is by using http://drupal.org/project/views_customfield.
#2