Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mfaber
Frequent Visitor

Scatter Chart with categories or any alternatives?

Hi,

 

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.

Power_bi_scatter1.png

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! 

4 REPLIES 4
v-yulgu-msft
Employee
Employee

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.

 

Thanks,
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.
BhaveshPatel
Community Champion
Community Champion

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

 

something like this 

library(ggplot2)

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

print(x)

Thanks & Regards,
Bhavesh

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.

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;

https://1drv.ms/f/s!ApNIcC8uXzkkguRxXxpXo2lLXzpFYg

Anonymous
Not applicable

You won't be able to use a .PBIX from someone else with an R visual until you complete some simple pre-requisites- see https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-visuals/ 

 

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 https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-ide/   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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.