Forum Discussion
Problems using the R script visual
- 4 years ago
I have already solved the problem, although not in the way I expected, I have simply loaded the columns to the visual object and in the code line 3 I have put "#dataset<-data.frame()", row 4 I have not touched. Then I write my R script and consider all the columns I've added to the visual, regardless of whether they're not mentioned within the dataset.
Someone told me that this can happen if Power BI is not updated to the latest version of R, I have the latest versions of both programs, so I hope this will be fixed in the next update. Thanks a lot.
Syndicate_Admin Your images are too small, I can't tell what is going on even when I zoom.
I can open them without problems and I see them with perfect quality (I will edit the size of the images of the post), but either way I make some cuts here. Basically this is what the R script editor looks like despite having 3 columns of a table loaded into the visual
the problem is that supposedly this visual object automatically loads me to the script the columns that I add, which happens in all the videos I have seen. And because of this I can't run graphs of interest. I leave the R script settings I currently have.
- V-lianl-msft4 years ago
Community Support
You can add a column to your dataset that uniquely identifies each row, similar to an IDENTITY column in a SQL Server table.
Use R script in desktop. Please refer to https://www.red-gate.com/simple-talk/sql/bi/power-bi-introduction-working-with-r-scripts-in-power-bi-desktop-part-3/ for more details.
- Syndicate_Admin4 years ago
Administrator
I have already solved the problem, although not in the way I expected, I have simply loaded the columns to the visual object and in the code line 3 I have put "#dataset<-data.frame()", row 4 I have not touched. Then I write my R script and consider all the columns I've added to the visual, regardless of whether they're not mentioned within the dataset.
Someone told me that this can happen if Power BI is not updated to the latest version of R, I have the latest versions of both programs, so I hope this will be fixed in the next update. Thanks a lot.