Forum Discussion
R visualisation to use imported tables
I am trying to use the 'R' visualisation in PowerBI. I have installed RStudio, linked PowerBI to R etc.
I am hoping that I can use the fields from a 'Get Data' import. I have pulled in data from a SQL database, used the 'R' visualisation and tried to code the following...
You are supposed to drag existing fields from your Power BI data model into the values area of the R visual, so that they can be added to the dataframe. Don't modify that part of the script or manually specify any fields.
2 Replies
- lbendlin
Super User
You are supposed to drag existing fields from your Power BI data model into the values area of the R visual, so that they can be added to the dataframe. Don't modify that part of the script or manually specify any fields.
- davidsimm10Frequent Visitor
This worked thank you! I didnt quite understand what you meant. I presumed because of the hashtags that it wouldnt work properly. Huge thank you
# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:# dataset <- data.frame(CountOfPatients, Division)# dataset <- unique(dataset)# Paste or type your script code here: