cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
josefm2
Frequent Visitor

Getting the average of all user rating

Hi,

 

I'm built a project-based commenting gallery. That is all done, comments are registering and displaying in the gallery. I have a rating and comment ID sharepoint column. I want to get all rating scores for a specific comment ID and then average them. And display the result in a standalone rating control. So every time I select a specific project from another gallery it will show the overall score rating based on all the individual score ratings.

1 ACCEPTED SOLUTION

Accepted Solutions
PG_WorXz10
Community Champion
Community Champion

Hi @josefm2 ,

 

May be something like below will help in your case ? 

 

Mod(Sum(Filter(YourRatingDatasourceName, commentID=Yourgallery.Selected.commentID),YourRatingsColumn),CountRows(Filter(YourRatingDatasourceName, commentID=Yourgallery.Selected.commentID).ID))*100

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

4 REPLIES 4
PG_WorXz10
Community Champion
Community Champion

Hi @josefm2 ,

 

May be something like below will help in your case ? 

 

Mod(Sum(Filter(YourRatingDatasourceName, commentID=Yourgallery.Selected.commentID),YourRatingsColumn),CountRows(Filter(YourRatingDatasourceName, commentID=Yourgallery.Selected.commentID).ID))*100

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Thanks for the help. Getting some error. Maybe I can describe this better. I have 2 galleries, galleryproject (getting its data from SL table1) displays all projects that has a column recordID and I have a separate commentgallery (getting its data from SL table2) that has all comments and comment ID. SL table 1 and 2 has 2 common column recordID and commentID. It works, if I select a project in galleryproject it opens the commentgallery for that specific project. In the commentgallery i setup a 5 star rating control.  In projectgallery I want to show the average of all ratings in based on the record ID/commentID for all items in the gallery, it will get the comment scores in SL table 2.

 

josefm2_0-1631433222789.png

 

 

 

josefm2
Frequent Visitor

Btw, for testing I'm just trying to output the solution you provided in a labelbox

 

josefm2_1-1631433413170.png

 

PG_WorXz10
Community Champion
Community Champion

Hi @josefm2 ,

 

Another try 

Mod(Sum(commentgallery ,YourRatingsColumn),CountRows(commentgallery ))*100

If any error please share the error message. 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (5,291)