Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello!
I have a side-passion project I'm working on. Including a very basic DUMMY data set below. What I am trying to create is a box and whisker plot through R, for each individual ID. I can actually do this part, but what I also need is for the individual points to appear by company, and for a single company to be a different color, depending on user choice.
For example, if the first sheet of the dashboard had a slicer where the end user chose their company (with this data, lets say they chose Z, from their choices of X, Y and Z). When they go to the next tab, when looking at the box/whisker plot for ID a, they would see 3 points with the graph (X,Y,Z), and the point for Z would be colored RED and the others would be GREY (or something to this effect).
I can create the R-boxplot visuals, but cannot get the dynamic color changing. Any suggestions? I'm not sure if I need measures, or columns, or what might be best. Thank you all for your help in advance.
Company ID PRICE
Z a 100
Z b 99
Z c 98
Z d 98
Y a 99
Y b 99
X a 100
X c 101
X d 98
Hi @dadorno ,
Hi @dadorno ,
I am currently unable to fulfill your request. Maybe you can try this.
The code in R Script Editor is below:
data<-dataset library(ggplot2) ggplot(data,aes(ID,PRICE))+geom_boxplot()+geom_boxplot(aes(colour = ID))+facet_grid(~Company)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |