-1

I have a custom comment type with a star rating field value. When people create a comment on a node type they can also select a rating. I need to create a way to get an average of the ratings from the comments for the node.

I have created a view block that has a contextual filter of Id from url that can be placed on a node and it will display all the rating fields for that node. I need to calculate the average of the values. The views aggregation is throwing up an error regarding (GROUP columns is illegal if there is no GROUP BY clause).

Is there a way to get the average ?

Update: I have sorted the problem with the averaging by adding a field that is used to group. Now having problems using the average as an outputted field in templates. The view is creating the average but the node ID is needed. How would I display the view average for each node on a list of nodes?

  • I have sorted the problem with the averaging by adding a field that is used to group. Now having problems using the average as an outputted field in templates. The view is creating the average but the node ID is needed. How would I display the view average for each node on a list of nodes ? – Greg Halford Oct 2 '18 at 11:43
-1

Used EVA module to output the views result.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.