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.
I am trying to develop several custom power bi visuals using R and Plotly. Previously I have not had any problem in developing ‘basic’ visuals, but would like to extend the visuals to include
1 Basic custom R/Plotly visual
I start a custom visual with the following steps
The visual is then compiled, I can add it to the Power BI report and it works fine.
2 Custom R/Plotly visual with data assignments
I start off with test custom visual as noted above and modify the capabilities.json file. I update the dataRoles and dataviewmappings sections to include 3 parameters: Xvalues, YValues and ColourValues.
The visual is then compiled (using pbiviz package in the command prompt)., I can add it to the Power BI report and it works fine.
3 Custom R/Plotly visual with data assignments and parameters
I am struggling to implement parameters within the customised visual. I have looked at Microsoft’s tutorial located at the following link.
According to the tutorial, I just have to change the capabilities.json file, the settings.ts file and the R script to identify whether a parameter value exists and assign a default value if required.
I have attempted to do that but can’t get the parameters working probably. Has anyone succeeded in getting the parameters working for a dynamic R custom visual? Or can share a link to a detailed tutorial that works?
Thanks.
Refer, if these can help
https://www.datacamp.com/community/tutorials/data-visualisation-powerbi
https://towardsdatascience.com/using-python-in-power-bi-ee95a6b71443
https://www.youtube.com/watch?v=BI8FcI_sgR0
https://www.mssqltips.com/sqlservertip/5936/transform-data-in-power-bi-with-r-and-python/
Thanks for the links Amitchandak.
Unfortunately the links don't help with my problem.
Cheers,
Hi @Anthony_W ,
Please find the following links, hope they can help you.
https://radacad.com/create-custom-visual-with-r-and-json-part3
https://www.youtube.com/watch?v=NMXlWu_oeyA
Best Regards
Rena
Thanks for the links yinginr,
I am working through the Radacad example. I downloaded the example visual data and managed to compile the custom.
I did receive an initial error during compilation stating a 'Globalize' package was not available. The error gave instructions for how to install the package - npm install --save globalize. Once the package is installed, the custom visual compiled OK.
I added the visual to a power bi report, but now receive the following R related error:
Error in strsplit(names(values), "\\.") : non-character argument
Calls: %>% -> eval -> eval -> style -> strsplit
Execution halted
I tried to find to find the strsplit function in the R code in the custom visual files, but haven't found. I suspect it is in one of the packages. I am still investigating the location of the error...
Hi @Anthony_W ,
Which sample you are using? Please try the solution in the following link and check if it works after you find the related "package".
https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/strsplit
Best Regards
Rena
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
91 | |
80 | |
61 | |
60 | |
58 |
User | Count |
---|---|
155 | |
119 | |
104 | |
78 | |
71 |