Correlation Plot
I love what you did here with this visual and it works perfectly in my PowerBI Desktop. However, when I try to view this from Power BI intranet, I get this error. I have tried to correct this by modifying the function and corrplot lines of code, with no success:
#verify if the column is numeric and non-constant
correctColumn <- function(someColumn) { !is.null(someColumn) && is.numeric(someColumn) && length(unique(someColumn)) > 1 }corrplot(M, method=method, order=order, type=type, addrect=addrect, #na.label = "?",
na.rm=TRUE,
mar = defMar, tl.col = tl.col, tl.cex=tl.cex, tl.srt=60, cl.ratio=0.2, cl.align="r",
number.digits=number.digits, number.cex=number.cex, addCoef.col=addCoef.col)How can I fix this?
Hi ironryan77,
Can you please share with me the PBIX, so I'd be able to reproduce this error?
- ironryan779 years agoKudo Commander
Thanks, but I think I got this working now!
- ironryan779 years agoKudo Commander
- How does corrplot calculate correlation matrices?
- Is this based on Pearson’s correlation coefficient formula? When I try plugging in my values to this formula, they do not match.
- Does corrplot remove duplicate rows?
- Does it handle aggregated columns?
- Mike_Carlo9 years agoMost Valuable Professional
Here is the documentation on the corrplot function that was used.
https://cran.r-project.org/web/packages/corrplot/corrplot.pdf
- JaouadZrhibi8 years agoHelper I
Hi,
After reading your nice posts, I need some help.
(Sorry, I m beginner on Power BI).
I would like to build graphs or indicators in order to see correlations between countries in import trade according 2 variables : weights in TON and volumes in USD.
I added this code but it doesn't work :
require("corrplot")
library(corrplot)M <- cor(dataset)
corrplot(M, method = "circle", tl.cex=0.6, tl.srt = 45, tl.col = "black", type= "upper", order="hclust")
If you have any suggestions, please advise.
Thank you in advance for your time and help,
Jaouad