This trick is for the ones that want to make a rating mechanism that depends on the number of likes and dislikes of a given row.
Columns you’ll need:
[likes] - normal column - Decimal - hidden
[dislikes] - normal column - Decimal - hidden
[rating] - virtual column - Decimal - shown
Formula for the column [rating]: IF(AND( [likes]>0, [dislikes]>0), ([likes]/([likes]+[dislikes]))*100.00, 0)
So, based on that formula from above we’ll get a score between 0 and 100 wich is the percentage that the likes represent in the global sum of likes and dislikes (the 100% of ratings). If we divide 100 by 5 (the number of stars we want) we get 20 wich is the ratio of increase we set for each rule. So a score from 1 to 19 is true for 1star rule, 20 to 39 is true for 2stars rule and so on.
Format rules for [rating] column
- 0stars - Highlight color: gray - text color: white - Formula: [rate]=0.00
- 1 star - Highlight color: #FFD300 - Text color: white - Formula: [rate]>0.00
- 2stars - Highlight color: #FFD300 - Text color: white - Formula: [rate]>20.00
- 3stars - Highlight color: #FFD300 - Text color: white - Formula: [rate]>40.00
- 4stars - Highlight color: #FFD300 - Text color: white - Formula: [rate]>60.00
- 5stars - Highlight color: #FFD300 - Text color: white - Formula: [rate]>80.00
We use a custom color #FFD300 because the default yellow doesn’t look so good. And we use white for the text to hide the score. And You’ll get this in your detail view:
![]()
or this if it has no stars
![]()
Actions:
like - Display inline into [rating] - Data: set the values from some columns - [likes]+1
dislike - Display inline into [rating] - Data: set the values from some columns -
[dislikes]+1
Formatting for like and dislike actions
- like action - icon: smile - Highlight color: green
- dislike action - icon: meh - Highlight color: red
Yu’ll get this in your detail view:

Select “No headings” in your detail view. And customize as you wish. Depending on what you’re doing, this is the final result:
I hope it helps!









