COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: pradeepbi25 on 15 Oct 2014 07:02:12 AM

Title: Five star rating
Post by: pradeepbi25 on 15 Oct 2014 07:02:12 AM
Hi

I have a data item which gives singleton value from 0 to 5 i.e., a five star rating.
ex: 4.85 , 4.35, 3.75

Now I need to convert these values to five star rating graph.
For example, if I get 4.5 from my data item I need to display 4 stars and one half star.
Title: Re: Five star rating
Post by: BigChris on 15 Oct 2014 07:58:37 AM
Hi - I don't know if this meets your requirement, but if it was me I'd round the value to the nearest half star so that you end up with ten possible outcomes. Then create those ten images and display the right one depending on the value of your measure.

If you don't do it that way you're going to have to find a way to partially fill a star...what woud you display for a score of 4.63 for example?
Title: Re: Five star rating
Post by: pradeepbi25 on 15 Oct 2014 08:02:16 AM
Hi Thanks for your reply.
For 4.63 I need to display 4 stars and one star with 60% filled.
I cannot round it to 4.5 or 5.
Title: Re: Five star rating
Post by: Lynn on 15 Oct 2014 08:41:09 AM
Maybe RAVE visualizations are the way to go. There are pre-defined ones on analytics zone or you can create your own. I haven't worked with this yet, but perhaps this points you in the right direction. I can't think of another way beyond the approach BigChris offered.

https://www.analyticszone.com/homepage/web/displayMarketplacePage.action#search/-/:Visualization
Title: Re: Five star rating
Post by: BigChris on 15 Oct 2014 08:41:30 AM
So create nine images for 0.1 - 0.9 stars. Work out how many whole stars to display and display the right partial star next to it.