
Power BI Custom Visuals – Using Text to Generate a Word Cloud
I have been asked a number of time how I created the word cloud in the Power BI Facebook analysis report shown in a previous video. So I thought it deserved a post on it’s own. I tend to focus more on numerical data, so it is a nice change to show you how you can use and visualize Text Data.
The Word cloud is not part of Power BI standard visuals but instead it is available to download from the Power BI custom visuals website. The visuals available on this website have been created by Power BI Partners and some even by Microsoft.
To use the custom visual, you must first download it and then upload it to Power BI. I would suggest you create a folder just for all of your custom visuals so that way they are all in the one place and you can easily find them.
Once you have downloaded the files, in PowerBI, under visualizations, there are 3 dots, this is the import visuals button. Select this and then locate the visual on your computer. You will get a security warning, but visuals downloaded from this site don’t generally have problems so you can just ignore this warning.
Once it has been installed you will see a new icon within the visualizations pane.
Let’s begin to create our word cloud. The data that I am using are reviews that I have taken directly from some of the online courses I teach. But you can use any sample data once it contains a data type of Text.
Into my categories field on the visualization set up and I am going to drop my text field, which is the column named comment. As soon as I drop this in the word cloud visualization is generated. What happens is it reads though all of the text and selects the most commonly used words. However in our example we can see a lot of words such as ‘and’ ‘If’ ‘or’. These words are known as stop words and really skewer our visualization.
To remove these stop words, if we select format and then turn on both Stop words and Default stop words, common words such as ‘And’ will be removed.
Looking at the word cloud now, I can still see an improvement we could make. I know that all of text that has been analyses relates to my online courses. So there is no real need to include the word ‘Course’ and it is the biggest word in the image.
To remove words other than stop words, you can enter these into the field below default stop words. Once I enter the word Course, my custom visualization updates. I think it’s a much better representation of the common words used that before we made the tweaks.
Other options include
- Rotating text
- Title
- The ability to change coloring of the words under ‘Data Colors’
- The ability to set bot the Maximum and minimum number of words under ‘General’