Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I need to build an interactive control chart in Ppower BI Desktop. I followed a step-to-step procedure as described in the community link The R code didn't result in creation of any visual... - Microsoft Fabric Community but getting an R script error as:
source('./r_files/flatten_HTML.r')
############### Library Declarations ###############
libraryRequireInstall("ggplot2");
libraryRequireInstall("plotly")
####################################################
################### Actual code ####################
g = qplot(`Petal.Length`, data = Values, fill = `Species`, main = Sys.time());
####################################################
############# Create and save widget ###############
p = ggplotly(g);
internalSaveWidget(p, 'out.html');
####################################################
################ Reduce paddings ###################
ReadFullFileReplaceString('out.html', 'out.html', ',"padding":[0-9]*,', ',"padding":0,')
####################################################
I spent loads of time on error resolution but didn't get through. Can someone in the community help me please?
Thanks In Advance;
Abhi
Solved! Go to Solution.
@AJ_2024 from the error, looks like you are missing some libraries, xml2, htmlwidgets. Do you want to try installing them and see if it works. If you have already installed them and it still does not work (which happened to me), the following worked for me.
When I run R in PBI, the packages are accessed by PBI from C:\Users\xxxx\Library. However, when I install the packages from R studio, the installed packages get saved in C:\Users\xxxx\Documents\R\win-library\3.5. Therefore, I changed the default path of "Install to Library:" in R studio from C:\Users\xxxx\Documents\R\win-library\3.5 to C:\Users\xxxx\Library and I got the desired output.
You cannot bring your own renderer. Only the standard plotting device is supported.
Create Power BI visuals using R - Power BI | Microsoft Learn
I am a pro user, I think we can create our own custom Power BI visuals that is packaged in single .pbiviz file and can be imported into the report.
@AJ_2024 from the error, looks like you are missing some libraries, xml2, htmlwidgets. Do you want to try installing them and see if it works. If you have already installed them and it still does not work (which happened to me), the following worked for me.
When I run R in PBI, the packages are accessed by PBI from C:\Users\xxxx\Library. However, when I install the packages from R studio, the installed packages get saved in C:\Users\xxxx\Documents\R\win-library\3.5. Therefore, I changed the default path of "Install to Library:" in R studio from C:\Users\xxxx\Documents\R\win-library\3.5 to C:\Users\xxxx\Library and I got the desired output.
This worked for me. Thanks
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
27 | |
11 | |
8 | |
6 | |
6 |