Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I need the sankey visual from this package cause the one of Power BI isn't adequate for my task but I struggle and I don't know why ...
So basically, I import this R code to load my data:
nodes <- read.table("C:/nodes.txt",header=TRUE)
links <- read.table("C:/links.txt",header=TRUE,sep=",")
data <- merge(nodes,links)
So here, I basically merge those two tables to trick Power BI (cause he can only load one dataframe, I basically do it before him by merging and having all information I need)
Then, I use the R visual and put my code into it, this code:
library(networkD3)
links <- unique(dataset[c("source","target","volume")])
nodes <- unique(dataset[c("name")])
networkD3::sankeyNetwork(Links = links, Nodes = nodes,
Source = 'source',
Target = 'target',
Value = 'volume',
NodeID = 'name')
But Power BI says that my code doesnt create any image. I know my dataset preparation is good because i can do a histogram easily but I can't have sankey image from it and I don't know why since this is a package supported by Power BI ?
What I suspect is that since this sankey function produces an HTML output, maybe that's why it doesn't work on Power BI ?
Best regards,
Morgan
Hi @Anonymous ,
I think this should more related to R script security, current power bi service not allow your to direct user r script code to invoke external datasource.(these operations works on desktop side)
Please take a look at following document to know more about this limitation:
Creating R visuals in the Power BI service
Regards,
Xiaoxin Sheng
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 99 | |
| 73 | |
| 66 | |
| 65 |