Showing results for 
Search instead for 
Did you mean: 
mfaber Regular Visitor
Regular Visitor

Scatter Chart with categories or any alternatives?



I'm trying to visualize amount of sales based on two attributes, screen size and HDD size. I created a matrix for this very simple, see below.


The scatter chart looks very promising, it's really just the same like this matrix, as X axis is HDD size, Y axis is screen size and the size of the circles are the amounts sold. But I can't make it work with categories, as I'm only able to set X and Y to count if they're not numerical values (so it shows the number of occurances for each categories).

I tried creating an ID column for each screen and hdd value above, like 1, 2, 3, etc, and set the X and Y axises to min, avg or max, that way it draws the correct chart, but I can't change the X and Y axis values from these ID numbers to their real meaning and it's far too complicated to read the chart without the correct labels.

I also tried Clustered Columns but that's really nowhere near it in both elegance and usefulness.


Any idea how to visualize this matrix above?


Thank you! 

Super User
Super User

Re: Scatter Chart with categories or any alternatives?

You can use ggplot2 library in R visual to draw that scattergraph.


something like this 


x <- ggplot(dataset, aes(x=Screen Size, y=HDD Size, color=cond)) + geom_point(shape=1) + scale_colour_hue(l=50)


Thanks & Regards,

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
mfaber Regular Visitor
Regular Visitor

Re: Scatter Chart with categories or any alternatives?

Hi @BhaveshPatel!


Thank you for your answer, but I've never used R script before, I'm not familiar with it. I'm just learning Power BI.

I uploaded to onedrive a sample of my data and the power bi presentation, if you have time, could you please show me how it works there?

You can find the Excel and PBI file below;!ApNIcC8uXzkkguRxXxpXo2lLXzpFYg

Community Support Team
Community Support Team

Re: Scatter Chart with categories or any alternatives?

Hi @mfaber,


From this tutorial, we can know that a scatter chart has two value axes to show one set of numerical data along a horizontal axis and another set of numerical values along a vertical axis. That is to say, the axis only supports numerical value, if you put text on it, it will count the values.


Currently, the column chart is the best choice to visualize this matrix.


Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Steve_Wheeler Established Member
Established Member

Re: Scatter Chart with categories or any alternatives?

You won't be able to use a .PBIX from someone else with an R visual until you complete some simple pre-requisites- see 


Then it's a simple matter of copying the 3-4 lines of R script in as suggested by @BhaveshPatel and running them.  I found it works surprisingly well.


If you go beyond that, I'd also recommend installing an R IDE - see   This will help quickly explore the other R features you'll likely want very soon after running the basic functions such 


And note the current Known Limitations with R in Power BI.