Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power BI can't show basic text results via the R script visual ?

Can the R custom visual not show text results? 


I just used the summary(dataset) function. And in R this properly shows the min/max/median/etc. but when I attempt the same script in R within Power BI I get the following error message:

 

"No image was created. The R code didn't result in a creation of any visuals. Make sure your R script results in a plot to the R default device."

 

I've correctly run R scripts via Power BI before, so I don't think my setup is incorrect. It seems odd though that Power BI can't display any/all output from an R script. This is frustrating, especially when it comes to troubleshooting.

 

Am I not looking at this correctly? Or is there something I'm missing?

 

 

Any thoughts/suggestions would help.

 

Thanks!

Jonathan 

1 ACCEPTED SOLUTION
danielPrieto
Advocate I
Advocate I

Hi @Anonymous

 

As you say R script visual only show image but a possible way to display the result of summary function is to use the grid.table function of the gridExtra package . I make an example with the iris dataset. See image below.

 

outputSummary.PNG

 

Surely this does not cover all your needs but I hope it will help you.

 

Regards,

Dani

View solution in original post

7 REPLIES 7
danielPrieto
Advocate I
Advocate I

Hi @Anonymous

 

As you say R script visual only show image but a possible way to display the result of summary function is to use the grid.table function of the gridExtra package . I make an example with the iris dataset. See image below.

 

outputSummary.PNG

 

Surely this does not cover all your needs but I hope it will help you.

 

Regards,

Dani

dannn777
Frequent Visitor

i believe all R output should be of image datatype rather than string.. hence "visual"

Anonymous
Not applicable

@dannn777,

Right. But how often is something displayed that is not a visual? The Card "visual" is a good example of this where it's a single number that has to be shown. 

 

I have linear regression model in R that is providing me with a single forecast that I would like to display in Power BI. But I can't seem to find a way to do it since Power BI can only display R visuals rather than the results of the R script itself.

 

Jonathan 

Anonymous
Not applicable
Anonymous
Not applicable

That's a good idea. I share your pain when I sometimes want to show a text value directly from R. I think you can get around this right now if you bake your R script into a custom visual. I haven't done it before but people make it sound pretty doable

Anonymous
Not applicable

@Anonymous,
Thanks for the head's up. I'll keep looking around, but I haven't seen any examples. I've tried using simple summary(dataframe) or str(dataframe) functions and came up with errors in Power BI, but perhaps I'm misunderstanding you.

 

Jonathan 

Anonymous
Not applicable

@Anonymous

 

I don't think the plain R visual will display anything other than a plot as of now. In order to get a visual to display text from R such as summary(dataframe), I think you would have to create your own visual. Check this out real quick and you may have some luck

 

Creating a custom visual

 

Parker

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.