Pär Adeen on 25 Sep 2016 17:46:14
Using R scripts for custom visuals requires the data to be related.
"Relationships – as with other Power BI Desktop visuals, if data fields from different tables with no defined relationship between them are selected, an error occurs".
I'm usin the VennDiagram library to show how different datasets relates, AB this visual is one example of when R visuals does not need to be related
- Comments (1)
RE: R script visuals shall not require related data
To get around the restriction, create a "Dummy" dataset with nothing useful in it. Pass the Dummy dataset to the R visual and ignore it! Create the data or get the data from an R package.
Not requiring a dataset for an R visual is also a good idea so a good graphics gallery can be created that could connect to data. All the graphics details of working in PowerBi can be resolved in advance before connecting to data.
Troubleshooting R problems in PowerBI is not so easy, so getting the graphics to work before trying to connect to data is very useful in my mind. For example, I wasted time last week getting the data ready, and getting the graphics to work in "regular" R only to find out the R package I wanted to use was not supported (yet) in Power BI. So, now I make sure I get an R graphic created first in Power BI, before worrying about connecting to data.