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
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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

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

 

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,382)