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.
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.
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.