Forum Discussion
WordCloud limitations
- 3 years ago
Galaxy999 , You can change the limit
But it may not exceed these limit
https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-data-points
You can reduce it using Rank as visual level filter or use R/Python visual
Galaxy999 , You can change the limit
But it may not exceed these limit
https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-data-points
You can reduce it using Rank as visual level filter or use R/Python visual
- Galaxy9993 years agoRegular Visitor
Hi amitchandak,
thank you for your response.
Regarding the limit of maximum number of records that the Word Cloud can take as input, I found that it is 2500.
I found it in the source code of the Word Cloud, which is hosted on GitHub: https://github.com/microsoft/PowerBI-visuals-WordCloud/blob/main/capabilities.json.
... I think this means that, when more than 2500 records are given to the Word Cloud, then only a sample (*) of 2500 of the given records are actually passed to the Word Cloud: the rest are discarded.
This parameter is not configurable without recompiling/rebuilding the Word Cloud visual from source code.
If I understood well, you also suggested that I can reduce the max number of records limit using Rank as visual filter.
I tried by setting a filter on the Word Cloud visual (Filter type: Top N - Show items: Top <n of records> - By value: <record id>).
As soon as I set a <n of records> greater than 2500, the "Too many values" warning begins appearing on the Word Clout.
Indeed, what I need is increasing such limit, not decreasing it (the number of records that the Word Cloud is able to take as input).
I still have to try the Python/R visual road...
Regards
(*) should not be a "sample", but the "top" 2500, as stated in the capabilities.json.
But, after some experiments, I found evidence that Power BI passes a sample of 30000 records to the Word Cloud, out of the total number of records currently filtered.
Then, the Word Cloud supposedly considers the top 2500 of these 30000 sampled records.
So, the final effect is that a sample of 2500 of the total records that should be represented by the Word Cloud is actually processed and displayed by the Word Cloud itself.
- Galaxy9993 years agoRegular Visitor
Hello,
I tried the Python/R pathway and could, partially, overcome the limitations of the "standard" Word Cloud visual.
First of all, I tried to use a Py visual, with the wordcloud library, but was forced to surrender after many hours of struggling with libraries that would not install due to various and quite obscure errors...
Then I tried with an R visual, and, being a newbie in R world, I found that I could quite easily get some encouraging results.
I borrowed the R code presented here: https://community.powerbi.com/t5/R-Script-Showcase/Wordcloud-with-r/td-p/60314.
So I now have a new R word cloud visual that is less nice, perhaps renders a bit slower, and works only on the desktop version of Power BI, but is not constrained by the 2500 record limit of the standard Power BI Word Cloud.
Note that, as far as I could experiment, Power BI still limits the amount of records that it passes to any R visual to 150 thousands.
As an added feature, I also inserted into my report another R visual that displays a visual leaderboard of the most frequent words contained in the currently selected records (same information displayed by part of the word cloud, but represented in a different way).
I borrowed the code from here: https://www.codementor.io/@alexander-k/r-word-frequency-in-dataframe-165jgfxxqe.