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

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.

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.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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