Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I am trying to import an R script into power BI, I tested the script in R and it works perfectly fine but when I try to import it to power bi using "get data -> r script", this is the message I get:
Here is the script I try to load into R script in Power BI:
actualLibPaths <- as.data.frame(.libPaths(.libPaths()[3]))
source(here::here("subfolder1", "subfolder2", "subfolder3", "subfolder4", "subfolder5", "script.R"))
output <- script_last %>%
group_by(actual_month) %>%
summarise(location = "main",
total_all = sum(total)
) %>%
bind_rows(script_last) %>%
mutate(id = row_number())
It is not a big script and nothing too complicated. I ran it in R before loading into power bi and everything is working just fine in R, however, I am not sure why i am getting that message, everything is set up just fine in power bi:
if someone could please help, I would really appreciate that
EDIT:
I changed my script in r script editor in power bi to just this:
source("C:/Users/MyUserName/folder1/subfolder1/subfolder2/subfolder3/subforlder4/script.R")
I tested it in R first and it works just fine but when I import to r script in power bi, this is the new message I get:
We encountered an error while trying to connect. Details: "SYMSXP"
I have no idea how to solve this, the error message is not very helpful, if someone could please help, I would appreciate that
HI @OPS-MLTSD,
I'd like to suggest you double-check the current account and permission configurations to ensure if you and power bi desktop client have enough permissions to access initiation path/folder of R script.
Regards,
Xiaoxin Sheng
HI @OPS-MLTSD,
Normally you can enter the parent folder of the configured path and right click on the folder and choose 'properties'. Then you can navigate the 'security' tab to check corresponded permission setting of different users.
How to Set File and Folder Permissions in Windows (online-tech-tips.com)
Regards,
Xiaoxin Sheng
@v-shex-msft thank you I will try this solutiona nd get back.
Meanwhile, I figured out why I am getting this error message:
We encountered an error while trying to connect. Details: "SYMSXP"
It is because I have a package in my r script not supported as part of the R packages supported by Power BI: Learn which R packages are supported - Power BI | Microsoft Learn
The package is called fpp3 - used for time series forecasting.
If anyone could tell me how I can contact Power BI - R support to get the package added, that would be much appreciated
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |