cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shantanugupta
Frequent Visitor

Need to make q-q plot in power bi

Can anyone help me to make a q-q plot in Power BI.

Attached data:  Data

Legend-Element

X Axis-PrimResult

Y Axis-DupResult

 

Doesnot know how to code. If anyone provide R or Python script? Or Is there any other better way to do this? 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @shantanugupta ,

 


 

Legend-Element

X Axis-PrimResult

Y Axis-DupResult

 


Based on your description, you have specify the x-axis field and the y-axis field. Therefore, what you need is a scatter plot, not a Q-Q plot. Right?

If so, you can create a scatter visual via the Built-in scatter chart in Power BI, or refer to this blog to create a R visual:

ggplot2 scatter plots : Quick start guide - R software and data visualization - Easy Guides - Wiki -....


 

library(ggplot2) # Basic scatter plot ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() # Change the point size, and shape ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point(size=2, shape=23)

 


 

If not, you can refer to this blog to create a Q-Q plot via R:

QQ-plots: Quantile-Quantile plots - R Base Graphs - Easy Guides - Wiki - STHDA.


 

my_data <- ToothGrowth

qqnorm(my_data$len, pch = 1, frame = FALSE)

qqline(my_data$len, col = "steelblue", lwd = 2)

 


 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @shantanugupta ,

 


 

Legend-Element

X Axis-PrimResult

Y Axis-DupResult

 


Based on your description, you have specify the x-axis field and the y-axis field. Therefore, what you need is a scatter plot, not a Q-Q plot. Right?

If so, you can create a scatter visual via the Built-in scatter chart in Power BI, or refer to this blog to create a R visual:

ggplot2 scatter plots : Quick start guide - R software and data visualization - Easy Guides - Wiki -....


 

library(ggplot2) # Basic scatter plot ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point() # Change the point size, and shape ggplot(mtcars, aes(x=wt, y=mpg)) + geom_point(size=2, shape=23)

 


 

If not, you can refer to this blog to create a Q-Q plot via R:

QQ-plots: Quantile-Quantile plots - R Base Graphs - Easy Guides - Wiki - STHDA.


 

my_data <- ToothGrowth

qqnorm(my_data$len, pch = 1, frame = FALSE)

qqline(my_data$len, col = "steelblue", lwd = 2)

 


 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

amitchandak
Super User
Super User

@shantanugupta , You should be able to plot a scatter, if needed. Add an index column from the power query. So that that you can use a details 

https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi

 

For python, I have explained steps in two videos

https://www.youtube.com/watch?v=5D0BkNsu5CM

https://www.youtube.com/watch?v=rX3-G8u5fwc

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.