Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

5 star rating code

I am trying to illustrate a rating system for my document and I need some help.  The field I have [Overall Rating] contains a value 0-5.  I want to be able to use those figures and display a color filled 5 star rating system.

Does anyone know how this can be accomplished?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Try something like this.  I just found some filled and unfilled star images from http://www.iconfinder.com/icondetails/49953/50/star_unfilled_icon and http://www.iconfinder.com/icondetails/14055/16/favorite_star_icon then used text objects to create the conditions.  Hope this helps!

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Do you already have images of filled and unfilled stars that you would want to use to display?

Once you have the images you can use conditional display fields on each of the five (not sure if this is the best approach performance wise but it will definitely get the job done).  For example for the first filled star in the conditional show field, [Overall Rating]>=1 and for the subsequent unfilled star [Overall Rating]<1

Not applicable
Author

I could not figure out how to display stars in my Qlikview document, so I currently have nothing in that space.

Anonymous
Not applicable
Author

Try something like this.  I just found some filled and unfilled star images from http://www.iconfinder.com/icondetails/49953/50/star_unfilled_icon and http://www.iconfinder.com/icondetails/14055/16/favorite_star_icon then used text objects to create the conditions.  Hope this helps!

Not applicable
Author

Yes, I got this to work.

Thank you.

farolito20
Contributor III
Contributor III

How you do that? How stars change?

farolito20
Contributor III
Contributor III

In design? Condition! ahaha that's cool

Not applicable
Author

You have to create a condition under Properties --> Layout --> in the show box click conditional, then enter in your formula.

barryharmsen
Luminary Alumni
Luminary Alumni

You could also use bundle load to include the stars in the QVW and associate them with your ranking data. This would make your expressions a lot easier. See the attached example.

Rating.png