Average Rating Code

Hi, my website is basically a review site for local venues to help with the safety in my local area. As per www.fixthenight. com/contact there is a form which when filled in goes into a data set (ratings form data set) I then connect every element of my venue pages to two different data sets (www.fixthenight. com/venues), one is the ratings form data set to show the ratings the other is a data set with names, descriptions and images of venues. The two data sets have an applied filter on them to ensure that they show data for a specific venue, for example www.fixthenight. com/electrik the filter is ‘name is electirk’ this is to add automation so when someone submits a review it will automatically go onto the relevant venue page.

I want to add an average star rating to each venue page, so a element showing 5 stars will show the average rating for that specific page. Due to all the venues being in one data set I’d need the code to have a filter on it to only look up and show the averages for the venue name such as electric. I’ve read a few articles and seen that it is possible to add code to get an average for ratings however I’m unsure how I’d add code in to ensure the code is only specific to each different venue page by adding a name filter in there, hopefully you can help me with this issue.

Take a look at the Ratings by User example. That will give you a good start. You can then customize the code according to any special requirements that you have.

In my opinion Ratings by User is only confusing if you do not wanna use a lightbox or a repeater for a simple star rating. There are so many rows in the code to delete (when you don´t want these elements) and how shall a beginner understand what to replace them with? I have tried for several days now but still can´t make a working star rating :persevere: