Tag Clouds in OBIEE

While reviewing an OBIEE 12c SampleApp VM a while back, I noticed they had examples of tag clouds as a visualization.  On further review, I saw it wasn’t a new chart view, but actually a narrative view, with some interesting HTML.  I was able to replicate some of it myself, with no RPD or configuration changes.

This isn’t a word cloud showing relative distribution of words in text – that would require some back end ETL and RPD changes.  Rather this shows a categorical dimension, with size and color based on measure values.


Start by writing a query that has a categorical column (City) and a measure (Score %).  Filter the measure to return top 25.

Add a new column and edit the expression for ‘Font Size’:

(25-rank(“Score % Measure”))+10

This causes the font size value to be between 10 and 34.

Add another new column and edit the expression for ‘Color’:

“Score %”*10+649500+”Score %”*1000

This one is a little tricker, and the actual expression will need to be tweaked based on the expected values your chosen measure returns – in my cause Score % was usually going to be between 60 and 100.  Ultimately, you are going to end up with a 6 digit number for the color RGB value.  With enough time and effort, you could probably get the color to actually represent something meaningful, but this does a good job of “randomizing” the colors.

Once the table is complete, create a narrative view, check off contains HTML, and add:

<span style=”font-size:@3px;color:#@4″>@1   </span>

This sets the font size as @3 and color @4, set from the values based on the measure.  Set the narrative view to 300 wide to force it to wrap, and you’re all done.