This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
When using the R script, is there an option to return a dataframe as a table for display alongside another R visual? So, I suppose that is really two questions 1) can a dataframe be returned from an R script and 2) can multiple objects be returned from an R script?
Yes, you may take a look at the following post.
OK so that is how you make a dataframe in R. Thanks. That doesn't show me how this can be displayed as a visual in PowerBI if that R code is run in an R visual.
What I mean to ask was whether I could put a dataframe containing something like summary statistics alongside an R visual… Say I plot a scatter plot and I want to display a linear trend across the scatter plot with its slope coefficient etc. I want to use the slicer to change the date range over which the graph is generated. I think my only option to display summary statistics is to annotate the graph with text. What would be vastly superior is to display summary statistics in a separate table with formatting etc. It doesn’t seem like PowerBI supports something like this in so far as I can tell.
It seems that you may use calculated columns and measures instead.
Hello,
I don't think that is what pk_123 meant.
Making charts with R often includes making different aggregations / calculations and then storing the cals alongside the data in data frame, on which the visuals are built on. The cals are then shown inside the visual (e.g. "stripline / target value", or standard deviation, or capability indices alongside bar chart or capability histogram).
In my case I have built the same data frame and chart in both standalone R application and then inside R visual in Power BI. I calculate Cpk and Cp indices by groups in a data frame. in standalone R everything goes fine, but when I have exact same data and exact same script in Power BI R, I get an error
df4$Cp <- df4$tol / (6 * df4$sdev)
" R script error. Error in '$<-.data.frame'('*tmp*', Cp, value = numeric(0)) :
replacement has 0 rows, data has 9
Calls:$<- ->$.data.frame
Execution halted
It would be nice to actually see the data frame built in power bi R in order to understand why this does not work. It works in standalone R.
Did anyone find a solution to return a table as an r visual in power bi?
Dear posters, did you find a solution? I have a similar issue and would like to know if there is a way to return a table from an R visual in power bi.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 33 | |
| 26 | |
| 21 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 43 | |
| 28 | |
| 24 | |
| 22 |