Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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.
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!
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
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)
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;
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.
User | Count |
---|---|
124 | |
108 | |
99 | |
62 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |